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