[e3d4e0a] | 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 |
|
---|
| 18 | namespace Google\Service\CloudSupport\Resource;
|
---|
| 19 |
|
---|
| 20 | use 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->cases_attachments;
|
---|
| 28 | * </code>
|
---|
| 29 | */
|
---|
| 30 | class CasesAttachments extends \Google\Service\Resource
|
---|
| 31 | {
|
---|
| 32 | /**
|
---|
| 33 | * List all the attachments associated with a support case. EXAMPLES: cURL:
|
---|
| 34 | * ```shell case="projects/some-project/cases/23598314" curl \ --header
|
---|
| 35 | * "Authorization: Bearer $(gcloud auth print-access-token)" \
|
---|
| 36 | * "https://cloudsupport.googleapis.com/v2/$case/attachments" ``` Python:
|
---|
| 37 | * ```python import googleapiclient.discovery api_version = "v2"
|
---|
| 38 | * supportApiService = googleapiclient.discovery.build(
|
---|
| 39 | * serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https:
|
---|
| 40 | * //cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
|
---|
| 41 | * request = ( supportApiService.cases() .attachments()
|
---|
| 42 | * .list(parent="projects/some-project/cases/43595344") )
|
---|
| 43 | * print(request.execute()) ``` (attachments.listCasesAttachments)
|
---|
| 44 | *
|
---|
| 45 | * @param string $parent Required. The name of the case for which attachments
|
---|
| 46 | * should be listed.
|
---|
| 47 | * @param array $optParams Optional parameters.
|
---|
| 48 | *
|
---|
| 49 | * @opt_param int pageSize The maximum number of attachments fetched with each
|
---|
| 50 | * request. If not provided, the default is 10. The maximum page size that will
|
---|
| 51 | * be returned is 100.
|
---|
| 52 | * @opt_param string pageToken A token identifying the page of results to
|
---|
| 53 | * return. If unspecified, the first page is retrieved.
|
---|
| 54 | * @return ListAttachmentsResponse
|
---|
| 55 | * @throws \Google\Service\Exception
|
---|
| 56 | */
|
---|
| 57 | public function listCasesAttachments($parent, $optParams = [])
|
---|
| 58 | {
|
---|
| 59 | $params = ['parent' => $parent];
|
---|
| 60 | $params = array_merge($params, $optParams);
|
---|
| 61 | return $this->call('list', [$params], ListAttachmentsResponse::class);
|
---|
| 62 | }
|
---|
| 63 | }
|
---|
| 64 |
|
---|
| 65 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 66 | class_alias(CasesAttachments::class, 'Google_Service_CloudSupport_Resource_CasesAttachments');
|
---|