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