1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\CloudSupport\Resource;
19
20use Google\Service\CloudSupport\ListAttachmentsResponse;
21
22/**
23 * The "attachments" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $cloudsupportService = new Google\Service\CloudSupport(...);
27 *   $attachments = $cloudsupportService->attachments;
28 *  </code>
29 */
30class CasesAttachments extends \Google\Service\Resource
31{
32  /**
33   * Retrieve all attachments associated with a support case.
34   * (attachments.listCasesAttachments)
35   *
36   * @param string $parent Required. The resource name of Case object for which
37   * attachments should be listed.
38   * @param array $optParams Optional parameters.
39   *
40   * @opt_param int pageSize The maximum number of attachments fetched with each
41   * request. If not provided, the default is 10. The maximum page size that will
42   * be returned is 100.
43   * @opt_param string pageToken A token identifying the page of results to
44   * return. If unspecified, the first page is retrieved.
45   * @return ListAttachmentsResponse
46   */
47  public function listCasesAttachments($parent, $optParams = [])
48  {
49    $params = ['parent' => $parent];
50    $params = array_merge($params, $optParams);
51    return $this->call('list', [$params], ListAttachmentsResponse::class);
52  }
53}
54
55// Adding a class alias for backwards compatibility with the previous class name.
56class_alias(CasesAttachments::class, 'Google_Service_CloudSupport_Resource_CasesAttachments');
57