[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\NetworkServices\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\NetworkServices\Gateway;
|
---|
| 21 | use Google\Service\NetworkServices\ListGatewaysResponse;
|
---|
| 22 | use Google\Service\NetworkServices\Operation;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "gateways" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $networkservicesService = new Google\Service\NetworkServices(...);
|
---|
| 29 | * $gateways = $networkservicesService->projects_locations_gateways;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsGateways extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a new Gateway in a given project and location. (gateways.create)
|
---|
| 36 | *
|
---|
| 37 | * @param string $parent Required. The parent resource of the Gateway. Must be
|
---|
| 38 | * in the format `projects/locations`.
|
---|
| 39 | * @param Gateway $postBody
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | *
|
---|
| 42 | * @opt_param string gatewayId Required. Short name of the Gateway resource to
|
---|
| 43 | * be created.
|
---|
| 44 | * @return Operation
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function create($parent, Gateway $postBody, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('create', [$params], Operation::class);
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * Deletes a single Gateway. (gateways.delete)
|
---|
| 55 | *
|
---|
| 56 | * @param string $name Required. A name of the Gateway to delete. Must be in the
|
---|
| 57 | * format `projects/locations/gateways`.
|
---|
| 58 | * @param array $optParams Optional parameters.
|
---|
| 59 | * @return Operation
|
---|
| 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], Operation::class);
|
---|
| 67 | }
|
---|
| 68 | /**
|
---|
| 69 | * Gets details of a single Gateway. (gateways.get)
|
---|
| 70 | *
|
---|
| 71 | * @param string $name Required. A name of the Gateway to get. Must be in the
|
---|
| 72 | * format `projects/locations/gateways`.
|
---|
| 73 | * @param array $optParams Optional parameters.
|
---|
| 74 | * @return Gateway
|
---|
| 75 | * @throws \Google\Service\Exception
|
---|
| 76 | */
|
---|
| 77 | public function get($name, $optParams = [])
|
---|
| 78 | {
|
---|
| 79 | $params = ['name' => $name];
|
---|
| 80 | $params = array_merge($params, $optParams);
|
---|
| 81 | return $this->call('get', [$params], Gateway::class);
|
---|
| 82 | }
|
---|
| 83 | /**
|
---|
| 84 | * Lists Gateways in a given project and location.
|
---|
| 85 | * (gateways.listProjectsLocationsGateways)
|
---|
| 86 | *
|
---|
| 87 | * @param string $parent Required. The project and location from which the
|
---|
| 88 | * Gateways should be listed, specified in the format `projects/locations`.
|
---|
| 89 | * @param array $optParams Optional parameters.
|
---|
| 90 | *
|
---|
| 91 | * @opt_param int pageSize Maximum number of Gateways to return per call.
|
---|
| 92 | * @opt_param string pageToken The value returned by the last
|
---|
| 93 | * `ListGatewaysResponse` Indicates that this is a continuation of a prior
|
---|
| 94 | * `ListGateways` call, and that the system should return the next page of data.
|
---|
| 95 | * @return ListGatewaysResponse
|
---|
| 96 | * @throws \Google\Service\Exception
|
---|
| 97 | */
|
---|
| 98 | public function listProjectsLocationsGateways($parent, $optParams = [])
|
---|
| 99 | {
|
---|
| 100 | $params = ['parent' => $parent];
|
---|
| 101 | $params = array_merge($params, $optParams);
|
---|
| 102 | return $this->call('list', [$params], ListGatewaysResponse::class);
|
---|
| 103 | }
|
---|
| 104 | /**
|
---|
| 105 | * Updates the parameters of a single Gateway. (gateways.patch)
|
---|
| 106 | *
|
---|
| 107 | * @param string $name Identifier. Name of the Gateway resource. It matches
|
---|
| 108 | * pattern `projects/locations/gateways/`.
|
---|
| 109 | * @param Gateway $postBody
|
---|
| 110 | * @param array $optParams Optional parameters.
|
---|
| 111 | *
|
---|
| 112 | * @opt_param string updateMask Optional. Field mask is used to specify the
|
---|
| 113 | * fields to be overwritten in the Gateway resource by the update. The fields
|
---|
| 114 | * specified in the update_mask are relative to the resource, not the full
|
---|
| 115 | * request. A field will be overwritten if it is in the mask. If the user does
|
---|
| 116 | * not provide a mask then all fields will be overwritten.
|
---|
| 117 | * @return Operation
|
---|
| 118 | * @throws \Google\Service\Exception
|
---|
| 119 | */
|
---|
| 120 | public function patch($name, Gateway $postBody, $optParams = [])
|
---|
| 121 | {
|
---|
| 122 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 123 | $params = array_merge($params, $optParams);
|
---|
| 124 | return $this->call('patch', [$params], Operation::class);
|
---|
| 125 | }
|
---|
| 126 | }
|
---|
| 127 |
|
---|
| 128 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 129 | class_alias(ProjectsLocationsGateways::class, 'Google_Service_NetworkServices_Resource_ProjectsLocationsGateways');
|
---|