[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\Networkconnectivity\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Networkconnectivity\GoogleLongrunningOperation;
|
---|
| 21 | use Google\Service\Networkconnectivity\ListRegionalEndpointsResponse;
|
---|
| 22 | use Google\Service\Networkconnectivity\RegionalEndpoint;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "regionalEndpoints" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $networkconnectivityService = new Google\Service\Networkconnectivity(...);
|
---|
| 29 | * $regionalEndpoints = $networkconnectivityService->projects_locations_regionalEndpoints;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsRegionalEndpoints extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a new RegionalEndpoint in a given project and location.
|
---|
| 36 | * (regionalEndpoints.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. The parent resource's name of the
|
---|
| 39 | * RegionalEndpoint.
|
---|
| 40 | * @param RegionalEndpoint $postBody
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | *
|
---|
| 43 | * @opt_param string regionalEndpointId Required. Unique id of the Regional
|
---|
| 44 | * Endpoint to be created.
|
---|
| 45 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
| 46 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
| 47 | * the server knows to ignore the request if it has already been completed. The
|
---|
| 48 | * server guarantees that for at least 60 minutes since the first request. For
|
---|
| 49 | * example, consider a situation where you make an initial request and the
|
---|
| 50 | * request times out. If you make the request again with the same request ID,
|
---|
| 51 | * the server can check if the original operation with the same request ID was
|
---|
| 52 | * received, and if so, ignores the second request. This prevents clients from
|
---|
| 53 | * accidentally creating duplicate commitments. The request ID must be a valid
|
---|
| 54 | * UUID with the exception that zero UUID is not supported
|
---|
| 55 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 56 | * @return GoogleLongrunningOperation
|
---|
| 57 | * @throws \Google\Service\Exception
|
---|
| 58 | */
|
---|
| 59 | public function create($parent, RegionalEndpoint $postBody, $optParams = [])
|
---|
| 60 | {
|
---|
| 61 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 62 | $params = array_merge($params, $optParams);
|
---|
| 63 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
| 64 | }
|
---|
| 65 | /**
|
---|
| 66 | * Deletes a single RegionalEndpoint. (regionalEndpoints.delete)
|
---|
| 67 | *
|
---|
| 68 | * @param string $name Required. The name of the RegionalEndpoint to delete.
|
---|
| 69 | * @param array $optParams Optional parameters.
|
---|
| 70 | *
|
---|
| 71 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
| 72 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
| 73 | * the server knows to ignore the request if it has already been completed. The
|
---|
| 74 | * server guarantees that for at least 60 minutes since the first request. For
|
---|
| 75 | * example, consider a situation where you make an initial request and the
|
---|
| 76 | * request times out. If you make the request again with the same request ID,
|
---|
| 77 | * the server can check if the original operation with the same request ID was
|
---|
| 78 | * received, and if so, ignores the second request. This prevents clients from
|
---|
| 79 | * accidentally creating duplicate commitments. The request ID must be a valid
|
---|
| 80 | * UUID with the exception that zero UUID is not supported
|
---|
| 81 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 82 | * @return GoogleLongrunningOperation
|
---|
| 83 | * @throws \Google\Service\Exception
|
---|
| 84 | */
|
---|
| 85 | public function delete($name, $optParams = [])
|
---|
| 86 | {
|
---|
| 87 | $params = ['name' => $name];
|
---|
| 88 | $params = array_merge($params, $optParams);
|
---|
| 89 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
| 90 | }
|
---|
| 91 | /**
|
---|
| 92 | * Gets details of a single RegionalEndpoint. (regionalEndpoints.get)
|
---|
| 93 | *
|
---|
| 94 | * @param string $name Required. Name of the RegionalEndpoint resource to get.
|
---|
| 95 | * Format: `projects/{project}/locations/{location}/regionalEndpoints/{regional_
|
---|
| 96 | * endpoint}`
|
---|
| 97 | * @param array $optParams Optional parameters.
|
---|
| 98 | * @return RegionalEndpoint
|
---|
| 99 | * @throws \Google\Service\Exception
|
---|
| 100 | */
|
---|
| 101 | public function get($name, $optParams = [])
|
---|
| 102 | {
|
---|
| 103 | $params = ['name' => $name];
|
---|
| 104 | $params = array_merge($params, $optParams);
|
---|
| 105 | return $this->call('get', [$params], RegionalEndpoint::class);
|
---|
| 106 | }
|
---|
| 107 | /**
|
---|
| 108 | * Lists RegionalEndpoints in a given project and location.
|
---|
| 109 | * (regionalEndpoints.listProjectsLocationsRegionalEndpoints)
|
---|
| 110 | *
|
---|
| 111 | * @param string $parent Required. The parent resource's name of the
|
---|
| 112 | * RegionalEndpoint.
|
---|
| 113 | * @param array $optParams Optional parameters.
|
---|
| 114 | *
|
---|
| 115 | * @opt_param string filter A filter expression that filters the results listed
|
---|
| 116 | * in the response.
|
---|
| 117 | * @opt_param string orderBy Sort the results by a certain order.
|
---|
| 118 | * @opt_param int pageSize Requested page size. Server may return fewer items
|
---|
| 119 | * than requested. If unspecified, server will pick an appropriate default.
|
---|
| 120 | * @opt_param string pageToken A page token.
|
---|
| 121 | * @return ListRegionalEndpointsResponse
|
---|
| 122 | * @throws \Google\Service\Exception
|
---|
| 123 | */
|
---|
| 124 | public function listProjectsLocationsRegionalEndpoints($parent, $optParams = [])
|
---|
| 125 | {
|
---|
| 126 | $params = ['parent' => $parent];
|
---|
| 127 | $params = array_merge($params, $optParams);
|
---|
| 128 | return $this->call('list', [$params], ListRegionalEndpointsResponse::class);
|
---|
| 129 | }
|
---|
| 130 | }
|
---|
| 131 |
|
---|
| 132 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 133 | class_alias(ProjectsLocationsRegionalEndpoints::class, 'Google_Service_Networkconnectivity_Resource_ProjectsLocationsRegionalEndpoints');
|
---|