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\GoogleCloudApigeeV1Reference; 21 22/** 23 * The "references" collection of methods. 24 * Typical usage is: 25 * <code> 26 * $apigeeService = new Google\Service\Apigee(...); 27 * $references = $apigeeService->references; 28 * </code> 29 */ 30class OrganizationsEnvironmentsReferences extends \Google\Service\Resource 31{ 32 /** 33 * Creates a Reference in the specified environment. (references.create) 34 * 35 * @param string $parent Required. The parent environment name under which the 36 * Reference will be created. Must be of the form 37 * `organizations/{org}/environments/{env}`. 38 * @param GoogleCloudApigeeV1Reference $postBody 39 * @param array $optParams Optional parameters. 40 * @return GoogleCloudApigeeV1Reference 41 */ 42 public function create($parent, GoogleCloudApigeeV1Reference $postBody, $optParams = []) 43 { 44 $params = ['parent' => $parent, 'postBody' => $postBody]; 45 $params = array_merge($params, $optParams); 46 return $this->call('create', [$params], GoogleCloudApigeeV1Reference::class); 47 } 48 /** 49 * Deletes a Reference from an environment. Returns the deleted Reference 50 * resource. (references.delete) 51 * 52 * @param string $name Required. The name of the Reference to delete. Must be of 53 * the form `organizations/{org}/environments/{env}/references/{ref}`. 54 * @param array $optParams Optional parameters. 55 * @return GoogleCloudApigeeV1Reference 56 */ 57 public function delete($name, $optParams = []) 58 { 59 $params = ['name' => $name]; 60 $params = array_merge($params, $optParams); 61 return $this->call('delete', [$params], GoogleCloudApigeeV1Reference::class); 62 } 63 /** 64 * Gets a Reference resource. (references.get) 65 * 66 * @param string $name Required. The name of the Reference to get. Must be of 67 * the form `organizations/{org}/environments/{env}/references/{ref}`. 68 * @param array $optParams Optional parameters. 69 * @return GoogleCloudApigeeV1Reference 70 */ 71 public function get($name, $optParams = []) 72 { 73 $params = ['name' => $name]; 74 $params = array_merge($params, $optParams); 75 return $this->call('get', [$params], GoogleCloudApigeeV1Reference::class); 76 } 77 /** 78 * Updates an existing Reference. Note that this operation has PUT semantics; it 79 * will replace the entirety of the existing Reference with the resource in the 80 * request body. (references.update) 81 * 82 * @param string $name Required. The name of the Reference to update. Must be of 83 * the form `organizations/{org}/environments/{env}/references/{ref}`. 84 * @param GoogleCloudApigeeV1Reference $postBody 85 * @param array $optParams Optional parameters. 86 * @return GoogleCloudApigeeV1Reference 87 */ 88 public function update($name, GoogleCloudApigeeV1Reference $postBody, $optParams = []) 89 { 90 $params = ['name' => $name, 'postBody' => $postBody]; 91 $params = array_merge($params, $optParams); 92 return $this->call('update', [$params], GoogleCloudApigeeV1Reference::class); 93 } 94} 95 96// Adding a class alias for backwards compatibility with the previous class name. 97class_alias(OrganizationsEnvironmentsReferences::class, 'Google_Service_Apigee_Resource_OrganizationsEnvironmentsReferences'); 98