[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\Apigee\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Apigee\GoogleCloudApigeeV1InstanceAttachment;
|
---|
| 21 | use Google\Service\Apigee\GoogleCloudApigeeV1ListInstanceAttachmentsResponse;
|
---|
| 22 | use Google\Service\Apigee\GoogleLongrunningOperation;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "attachments" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
| 29 | * $attachments = $apigeeService->organizations_instances_attachments;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class OrganizationsInstancesAttachments extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a new attachment of an environment to an instance. **Note:** Not
|
---|
| 36 | * supported for Apigee hybrid. (attachments.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. Name of the instance. Use the following
|
---|
| 39 | * structure in your request: `organizations/{org}/instances/{instance}`.
|
---|
| 40 | * @param GoogleCloudApigeeV1InstanceAttachment $postBody
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | * @return GoogleLongrunningOperation
|
---|
| 43 | * @throws \Google\Service\Exception
|
---|
| 44 | */
|
---|
| 45 | public function create($parent, GoogleCloudApigeeV1InstanceAttachment $postBody, $optParams = [])
|
---|
| 46 | {
|
---|
| 47 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 48 | $params = array_merge($params, $optParams);
|
---|
| 49 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
| 50 | }
|
---|
| 51 | /**
|
---|
| 52 | * Deletes an attachment. **Note:** Not supported for Apigee hybrid.
|
---|
| 53 | * (attachments.delete)
|
---|
| 54 | *
|
---|
| 55 | * @param string $name Required. Name of the attachment. Use the following
|
---|
| 56 | * structure in your request:
|
---|
| 57 | * `organizations/{org}/instances/{instance}/attachments/{attachment}`.
|
---|
| 58 | * @param array $optParams Optional parameters.
|
---|
| 59 | * @return GoogleLongrunningOperation
|
---|
| 60 | * @throws \Google\Service\Exception
|
---|
| 61 | */
|
---|
| 62 | public function delete($name, $optParams = [])
|
---|
| 63 | {
|
---|
| 64 | $params = ['name' => $name];
|
---|
| 65 | $params = array_merge($params, $optParams);
|
---|
| 66 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
| 67 | }
|
---|
| 68 | /**
|
---|
| 69 | * Gets an attachment. **Note:** Not supported for Apigee hybrid.
|
---|
| 70 | * (attachments.get)
|
---|
| 71 | *
|
---|
| 72 | * @param string $name Required. Name of the attachment. Use the following
|
---|
| 73 | * structure in your request:
|
---|
| 74 | * `organizations/{org}/instances/{instance}/attachments/{attachment}`
|
---|
| 75 | * @param array $optParams Optional parameters.
|
---|
| 76 | * @return GoogleCloudApigeeV1InstanceAttachment
|
---|
| 77 | * @throws \Google\Service\Exception
|
---|
| 78 | */
|
---|
| 79 | public function get($name, $optParams = [])
|
---|
| 80 | {
|
---|
| 81 | $params = ['name' => $name];
|
---|
| 82 | $params = array_merge($params, $optParams);
|
---|
| 83 | return $this->call('get', [$params], GoogleCloudApigeeV1InstanceAttachment::class);
|
---|
| 84 | }
|
---|
| 85 | /**
|
---|
| 86 | * Lists all attachments to an instance. **Note:** Not supported for Apigee
|
---|
| 87 | * hybrid. (attachments.listOrganizationsInstancesAttachments)
|
---|
| 88 | *
|
---|
| 89 | * @param string $parent Required. Name of the organization. Use the following
|
---|
| 90 | * structure in your request: `organizations/{org}/instances/{instance}`
|
---|
| 91 | * @param array $optParams Optional parameters.
|
---|
| 92 | *
|
---|
| 93 | * @opt_param int pageSize Maximum number of instance attachments to return.
|
---|
| 94 | * Defaults to 25.
|
---|
| 95 | * @opt_param string pageToken Page token, returned by a previous
|
---|
| 96 | * ListInstanceAttachments call, that you can use to retrieve the next page of
|
---|
| 97 | * content.
|
---|
| 98 | * @return GoogleCloudApigeeV1ListInstanceAttachmentsResponse
|
---|
| 99 | * @throws \Google\Service\Exception
|
---|
| 100 | */
|
---|
| 101 | public function listOrganizationsInstancesAttachments($parent, $optParams = [])
|
---|
| 102 | {
|
---|
| 103 | $params = ['parent' => $parent];
|
---|
| 104 | $params = array_merge($params, $optParams);
|
---|
| 105 | return $this->call('list', [$params], GoogleCloudApigeeV1ListInstanceAttachmentsResponse::class);
|
---|
| 106 | }
|
---|
| 107 | }
|
---|
| 108 |
|
---|
| 109 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 110 | class_alias(OrganizationsInstancesAttachments::class, 'Google_Service_Apigee_Resource_OrganizationsInstancesAttachments');
|
---|