[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\InternalRange;
|
---|
| 22 | use Google\Service\Networkconnectivity\ListInternalRangesResponse;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "internalRanges" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $networkconnectivityService = new Google\Service\Networkconnectivity(...);
|
---|
| 29 | * $internalRanges = $networkconnectivityService->projects_locations_internalRanges;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsInternalRanges extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a new internal range in a given project and location.
|
---|
| 36 | * (internalRanges.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. The parent resource's name of the internal
|
---|
| 39 | * range.
|
---|
| 40 | * @param InternalRange $postBody
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | *
|
---|
| 43 | * @opt_param string internalRangeId Optional. Resource ID (i.e. 'foo' in
|
---|
| 44 | * '[...]/projects/p/locations/l/internalRanges/foo') See
|
---|
| 45 | * https://google.aip.dev/122#resource-id-segments Unique per location.
|
---|
| 46 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
| 47 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
| 48 | * the server will know to ignore the request if it has already been completed.
|
---|
| 49 | * The server will guarantee that for at least 60 minutes since the first
|
---|
| 50 | * request. For example, consider a situation where you make an initial request
|
---|
| 51 | * and the request times out. If you make the request again with the same
|
---|
| 52 | * request ID, the server can check if original operation with the same request
|
---|
| 53 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
| 54 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
| 55 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
| 56 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 57 | * @return GoogleLongrunningOperation
|
---|
| 58 | * @throws \Google\Service\Exception
|
---|
| 59 | */
|
---|
| 60 | public function create($parent, InternalRange $postBody, $optParams = [])
|
---|
| 61 | {
|
---|
| 62 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 63 | $params = array_merge($params, $optParams);
|
---|
| 64 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
| 65 | }
|
---|
| 66 | /**
|
---|
| 67 | * Deletes a single internal range. (internalRanges.delete)
|
---|
| 68 | *
|
---|
| 69 | * @param string $name Required. The name of the internal range to delete.
|
---|
| 70 | * @param array $optParams Optional parameters.
|
---|
| 71 | *
|
---|
| 72 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
| 73 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
| 74 | * the server will know to ignore the request if it has already been completed.
|
---|
| 75 | * The server will guarantee that for at least 60 minutes after the first
|
---|
| 76 | * request. For example, consider a situation where you make an initial request
|
---|
| 77 | * and the request times out. If you make the request again with the same
|
---|
| 78 | * request ID, the server can check if original operation with the same request
|
---|
| 79 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
| 80 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
| 81 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
| 82 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 83 | * @return GoogleLongrunningOperation
|
---|
| 84 | * @throws \Google\Service\Exception
|
---|
| 85 | */
|
---|
| 86 | public function delete($name, $optParams = [])
|
---|
| 87 | {
|
---|
| 88 | $params = ['name' => $name];
|
---|
| 89 | $params = array_merge($params, $optParams);
|
---|
| 90 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
| 91 | }
|
---|
| 92 | /**
|
---|
| 93 | * Gets details of a single internal range. (internalRanges.get)
|
---|
| 94 | *
|
---|
| 95 | * @param string $name Required. Name of the InternalRange to get.
|
---|
| 96 | * @param array $optParams Optional parameters.
|
---|
| 97 | * @return InternalRange
|
---|
| 98 | * @throws \Google\Service\Exception
|
---|
| 99 | */
|
---|
| 100 | public function get($name, $optParams = [])
|
---|
| 101 | {
|
---|
| 102 | $params = ['name' => $name];
|
---|
| 103 | $params = array_merge($params, $optParams);
|
---|
| 104 | return $this->call('get', [$params], InternalRange::class);
|
---|
| 105 | }
|
---|
| 106 | /**
|
---|
| 107 | * Lists internal ranges in a given project and location.
|
---|
| 108 | * (internalRanges.listProjectsLocationsInternalRanges)
|
---|
| 109 | *
|
---|
| 110 | * @param string $parent Required. The parent resource's name.
|
---|
| 111 | * @param array $optParams Optional parameters.
|
---|
| 112 | *
|
---|
| 113 | * @opt_param string filter A filter expression that filters the results listed
|
---|
| 114 | * in the response.
|
---|
| 115 | * @opt_param string orderBy Sort the results by a certain order.
|
---|
| 116 | * @opt_param int pageSize The maximum number of results per page that should be
|
---|
| 117 | * returned.
|
---|
| 118 | * @opt_param string pageToken The page token.
|
---|
| 119 | * @return ListInternalRangesResponse
|
---|
| 120 | * @throws \Google\Service\Exception
|
---|
| 121 | */
|
---|
| 122 | public function listProjectsLocationsInternalRanges($parent, $optParams = [])
|
---|
| 123 | {
|
---|
| 124 | $params = ['parent' => $parent];
|
---|
| 125 | $params = array_merge($params, $optParams);
|
---|
| 126 | return $this->call('list', [$params], ListInternalRangesResponse::class);
|
---|
| 127 | }
|
---|
| 128 | /**
|
---|
| 129 | * Updates the parameters of a single internal range. (internalRanges.patch)
|
---|
| 130 | *
|
---|
| 131 | * @param string $name Immutable. The name of an internal range. Format:
|
---|
| 132 | * projects/{project}/locations/{location}/internalRanges/{internal_range} See:
|
---|
| 133 | * https://google.aip.dev/122#fields-representing-resource-names
|
---|
| 134 | * @param InternalRange $postBody
|
---|
| 135 | * @param array $optParams Optional parameters.
|
---|
| 136 | *
|
---|
| 137 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
| 138 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
| 139 | * the server will know to ignore the request if it has already been completed.
|
---|
| 140 | * The server will guarantee that for at least 60 minutes since the first
|
---|
| 141 | * request. For example, consider a situation where you make an initial request
|
---|
| 142 | * and the request times out. If you make the request again with the same
|
---|
| 143 | * request ID, the server can check if original operation with the same request
|
---|
| 144 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
| 145 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
| 146 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
| 147 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 148 | * @opt_param string updateMask Optional. Field mask is used to specify the
|
---|
| 149 | * fields to be overwritten in the InternalRange resource by the update. The
|
---|
| 150 | * fields specified in the update_mask are relative to the resource, not the
|
---|
| 151 | * full request. A field will be overwritten if it is in the mask. If the user
|
---|
| 152 | * does not provide a mask then all fields will be overwritten.
|
---|
| 153 | * @return GoogleLongrunningOperation
|
---|
| 154 | * @throws \Google\Service\Exception
|
---|
| 155 | */
|
---|
| 156 | public function patch($name, InternalRange $postBody, $optParams = [])
|
---|
| 157 | {
|
---|
| 158 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 159 | $params = array_merge($params, $optParams);
|
---|
| 160 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
| 161 | }
|
---|
| 162 | }
|
---|
| 163 |
|
---|
| 164 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 165 | class_alias(ProjectsLocationsInternalRanges::class, 'Google_Service_Networkconnectivity_Resource_ProjectsLocationsInternalRanges');
|
---|