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