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