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\VMwareEngine\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\VMwareEngine\ExternalAddress;
|
---|
21 | use Google\Service\VMwareEngine\ListExternalAddressesResponse;
|
---|
22 | use Google\Service\VMwareEngine\Operation;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "externalAddresses" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $vmwareengineService = new Google\Service\VMwareEngine(...);
|
---|
29 | * $externalAddresses = $vmwareengineService->projects_locations_privateClouds_externalAddresses;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsPrivateCloudsExternalAddresses extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new `ExternalAddress` resource in a given private cloud. The
|
---|
36 | * network policy that corresponds to the private cloud must have the external
|
---|
37 | * IP address network service enabled (`NetworkPolicy.external_ip`).
|
---|
38 | * (externalAddresses.create)
|
---|
39 | *
|
---|
40 | * @param string $parent Required. The resource name of the private cloud to
|
---|
41 | * create a new external IP address in. Resource names are schemeless URIs that
|
---|
42 | * follow the conventions in
|
---|
43 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
44 | * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
|
---|
45 | * @param ExternalAddress $postBody
|
---|
46 | * @param array $optParams Optional parameters.
|
---|
47 | *
|
---|
48 | * @opt_param string externalAddressId Required. The user-provided identifier of
|
---|
49 | * the `ExternalAddress` to be created. This identifier must be unique among
|
---|
50 | * `ExternalAddress` resources within the parent and becomes the final token in
|
---|
51 | * the name URI. The identifier must meet the following requirements: * Only
|
---|
52 | * contains 1-63 alphanumeric characters and hyphens * Begins with an
|
---|
53 | * alphabetical character * Ends with a non-hyphen character * Not formatted as
|
---|
54 | * a UUID * Complies with [RFC
|
---|
55 | * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
|
---|
56 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
57 | * Specify a unique request ID so that if you must retry your request, the
|
---|
58 | * server will know to ignore the request if it has already been completed. The
|
---|
59 | * server guarantees that a request doesn't result in creation of duplicate
|
---|
60 | * commitments for at least 60 minutes. For example, consider a situation where
|
---|
61 | * you make an initial request and the request times out. If you make the
|
---|
62 | * request again with the same request ID, the server can check if the original
|
---|
63 | * operation with the same request ID was received, and if so, will ignore the
|
---|
64 | * second request. This prevents clients from accidentally creating duplicate
|
---|
65 | * commitments. The request ID must be a valid UUID with the exception that zero
|
---|
66 | * UUID is not supported (00000000-0000-0000-0000-000000000000).
|
---|
67 | * @return Operation
|
---|
68 | * @throws \Google\Service\Exception
|
---|
69 | */
|
---|
70 | public function create($parent, ExternalAddress $postBody, $optParams = [])
|
---|
71 | {
|
---|
72 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
73 | $params = array_merge($params, $optParams);
|
---|
74 | return $this->call('create', [$params], Operation::class);
|
---|
75 | }
|
---|
76 | /**
|
---|
77 | * Deletes a single external IP address. When you delete an external IP address,
|
---|
78 | * connectivity between the external IP address and the corresponding internal
|
---|
79 | * IP address is lost. (externalAddresses.delete)
|
---|
80 | *
|
---|
81 | * @param string $name Required. The resource name of the external IP address to
|
---|
82 | * delete. Resource names are schemeless URIs that follow the conventions in
|
---|
83 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
84 | * `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
85 | * cloud/externalAddresses/my-ip`
|
---|
86 | * @param array $optParams Optional parameters.
|
---|
87 | *
|
---|
88 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
89 | * Specify a unique request ID so that if you must retry your request, the
|
---|
90 | * server will know to ignore the request if it has already been completed. The
|
---|
91 | * server guarantees that a request doesn't result in creation of duplicate
|
---|
92 | * commitments for at least 60 minutes. For example, consider a situation where
|
---|
93 | * you make an initial request and the request times out. If you make the
|
---|
94 | * request again with the same request ID, the server can check if the original
|
---|
95 | * operation with the same request ID was received, and if so, will ignore the
|
---|
96 | * second request. This prevents clients from accidentally creating duplicate
|
---|
97 | * commitments. The request ID must be a valid UUID with the exception that zero
|
---|
98 | * UUID is not supported (00000000-0000-0000-0000-000000000000).
|
---|
99 | * @return Operation
|
---|
100 | * @throws \Google\Service\Exception
|
---|
101 | */
|
---|
102 | public function delete($name, $optParams = [])
|
---|
103 | {
|
---|
104 | $params = ['name' => $name];
|
---|
105 | $params = array_merge($params, $optParams);
|
---|
106 | return $this->call('delete', [$params], Operation::class);
|
---|
107 | }
|
---|
108 | /**
|
---|
109 | * Gets details of a single external IP address. (externalAddresses.get)
|
---|
110 | *
|
---|
111 | * @param string $name Required. The resource name of the external IP address to
|
---|
112 | * retrieve. Resource names are schemeless URIs that follow the conventions in
|
---|
113 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
114 | * `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
115 | * cloud/externalAddresses/my-ip`
|
---|
116 | * @param array $optParams Optional parameters.
|
---|
117 | * @return ExternalAddress
|
---|
118 | * @throws \Google\Service\Exception
|
---|
119 | */
|
---|
120 | public function get($name, $optParams = [])
|
---|
121 | {
|
---|
122 | $params = ['name' => $name];
|
---|
123 | $params = array_merge($params, $optParams);
|
---|
124 | return $this->call('get', [$params], ExternalAddress::class);
|
---|
125 | }
|
---|
126 | /**
|
---|
127 | * Lists external IP addresses assigned to VMware workload VMs in a given
|
---|
128 | * private cloud.
|
---|
129 | * (externalAddresses.listProjectsLocationsPrivateCloudsExternalAddresses)
|
---|
130 | *
|
---|
131 | * @param string $parent Required. The resource name of the private cloud to be
|
---|
132 | * queried for external IP addresses. Resource names are schemeless URIs that
|
---|
133 | * follow the conventions in
|
---|
134 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
135 | * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
|
---|
136 | * @param array $optParams Optional parameters.
|
---|
137 | *
|
---|
138 | * @opt_param string filter A filter expression that matches resources returned
|
---|
139 | * in the response. The expression must specify the field name, a comparison
|
---|
140 | * operator, and the value that you want to use for filtering. The value must be
|
---|
141 | * a string, a number, or a boolean. The comparison operator must be `=`, `!=`,
|
---|
142 | * `>`, or `<`. For example, if you are filtering a list of IP addresses, you
|
---|
143 | * can exclude the ones named `example-ip` by specifying `name != "example-ip"`.
|
---|
144 | * To filter on multiple expressions, provide each separate expression within
|
---|
145 | * parentheses. For example: ``` (name = "example-ip") (createTime >
|
---|
146 | * "2021-04-12T08:15:10.40Z") ``` By default, each expression is an `AND`
|
---|
147 | * expression. However, you can include `AND` and `OR` expressions explicitly.
|
---|
148 | * For example: ``` (name = "example-ip-1") AND (createTime >
|
---|
149 | * "2021-04-12T08:15:10.40Z") OR (name = "example-ip-2") ```
|
---|
150 | * @opt_param string orderBy Sorts list results by a certain order. By default,
|
---|
151 | * returned results are ordered by `name` in ascending order. You can also sort
|
---|
152 | * results in descending order based on the `name` value using `orderBy="name
|
---|
153 | * desc"`. Currently, only ordering by `name` is supported.
|
---|
154 | * @opt_param int pageSize The maximum number of external IP addresses to return
|
---|
155 | * in one page. The service may return fewer than this value. The maximum value
|
---|
156 | * is coerced to 1000. The default value of this field is 500.
|
---|
157 | * @opt_param string pageToken A page token, received from a previous
|
---|
158 | * `ListExternalAddresses` call. Provide this to retrieve the subsequent page.
|
---|
159 | * When paginating, all other parameters provided to `ListExternalAddresses`
|
---|
160 | * must match the call that provided the page token.
|
---|
161 | * @return ListExternalAddressesResponse
|
---|
162 | * @throws \Google\Service\Exception
|
---|
163 | */
|
---|
164 | public function listProjectsLocationsPrivateCloudsExternalAddresses($parent, $optParams = [])
|
---|
165 | {
|
---|
166 | $params = ['parent' => $parent];
|
---|
167 | $params = array_merge($params, $optParams);
|
---|
168 | return $this->call('list', [$params], ListExternalAddressesResponse::class);
|
---|
169 | }
|
---|
170 | /**
|
---|
171 | * Updates the parameters of a single external IP address. Only fields specified
|
---|
172 | * in `update_mask` are applied. During operation processing, the resource is
|
---|
173 | * temporarily in the `ACTIVE` state before the operation fully completes. For
|
---|
174 | * that period of time, you can't update the resource. Use the operation status
|
---|
175 | * to determine when the processing fully completes. (externalAddresses.patch)
|
---|
176 | *
|
---|
177 | * @param string $name Output only. Identifier. The resource name of this
|
---|
178 | * external IP address. Resource names are schemeless URIs that follow the
|
---|
179 | * conventions in https://cloud.google.com/apis/design/resource_names. For
|
---|
180 | * example: `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
181 | * cloud/externalAddresses/my-address`
|
---|
182 | * @param ExternalAddress $postBody
|
---|
183 | * @param array $optParams Optional parameters.
|
---|
184 | *
|
---|
185 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
186 | * Specify a unique request ID so that if you must retry your request, the
|
---|
187 | * server will know to ignore the request if it has already been completed. The
|
---|
188 | * server guarantees that a request doesn't result in creation of duplicate
|
---|
189 | * commitments for at least 60 minutes. For example, consider a situation where
|
---|
190 | * you make an initial request and the request times out. If you make the
|
---|
191 | * request again with the same request ID, the server can check if the original
|
---|
192 | * operation with the same request ID was received, and if so, will ignore the
|
---|
193 | * second request. This prevents clients from accidentally creating duplicate
|
---|
194 | * commitments. The request ID must be a valid UUID with the exception that zero
|
---|
195 | * UUID is not supported (00000000-0000-0000-0000-000000000000).
|
---|
196 | * @opt_param string updateMask Required. Field mask is used to specify the
|
---|
197 | * fields to be overwritten in the `ExternalAddress` resource by the update. The
|
---|
198 | * fields specified in the `update_mask` are relative to the resource, not the
|
---|
199 | * full request. A field will be overwritten if it is in the mask. If the user
|
---|
200 | * does not provide a mask then all fields will be overwritten.
|
---|
201 | * @return Operation
|
---|
202 | * @throws \Google\Service\Exception
|
---|
203 | */
|
---|
204 | public function patch($name, ExternalAddress $postBody, $optParams = [])
|
---|
205 | {
|
---|
206 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
207 | $params = array_merge($params, $optParams);
|
---|
208 | return $this->call('patch', [$params], Operation::class);
|
---|
209 | }
|
---|
210 | }
|
---|
211 |
|
---|
212 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
213 | class_alias(ProjectsLocationsPrivateCloudsExternalAddresses::class, 'Google_Service_VMwareEngine_Resource_ProjectsLocationsPrivateCloudsExternalAddresses');
|
---|