source: vendor/google/apiclient-services/src/Compute/Resource/TargetTcpProxies.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 3 weeks ago

Upload new project files

  • Property mode set to 100644
File size: 17.3 KB
Line 
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
18namespace Google\Service\Compute\Resource;
19
20use Google\Service\Compute\Operation;
21use Google\Service\Compute\TargetTcpProxiesSetBackendServiceRequest;
22use Google\Service\Compute\TargetTcpProxiesSetProxyHeaderRequest;
23use Google\Service\Compute\TargetTcpProxy;
24use Google\Service\Compute\TargetTcpProxyAggregatedList;
25use Google\Service\Compute\TargetTcpProxyList;
26
27/**
28 * The "targetTcpProxies" collection of methods.
29 * Typical usage is:
30 * <code>
31 * $computeService = new Google\Service\Compute(...);
32 * $targetTcpProxies = $computeService->targetTcpProxies;
33 * </code>
34 */
35class TargetTcpProxies extends \Google\Service\Resource
36{
37 /**
38 * Retrieves the list of all TargetTcpProxy resources, regional and global,
39 * available to the specified project. To prevent failure, Google recommends
40 * that you set the `returnPartialSuccess` parameter to `true`.
41 * (targetTcpProxies.aggregatedList)
42 *
43 * @param string $project Name of the project scoping this request.
44 * @param array $optParams Optional parameters.
45 *
46 * @opt_param string filter A filter expression that filters resources listed in
47 * the response. Most Compute resources support two types of filter expressions:
48 * expressions that support regular expressions and expressions that follow API
49 * improvement proposal AIP-160. These two types of filter expressions cannot be
50 * mixed in one request. If you want to use AIP-160, your expression must
51 * specify the field name, an operator, and the value that you want to use for
52 * filtering. The value must be a string, a number, or a boolean. The operator
53 * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
54 * are filtering Compute Engine instances, you can exclude instances named
55 * `example-instance` by specifying `name != example-instance`. The `:*`
56 * comparison can be used to test whether a key has been defined. For example,
57 * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
58 * also filter nested fields. For example, you could specify
59 * `scheduling.automaticRestart = false` to include instances only if they are
60 * not scheduled for automatic restarts. You can use filtering on nested fields
61 * to filter based on resource labels. To filter on multiple expressions,
62 * provide each separate expression within parentheses. For example: ```
63 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
64 * default, each expression is an `AND` expression. However, you can include
65 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
66 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
67 * (scheduling.automaticRestart = true) ``` If you want to use a regular
68 * expression, use the `eq` (equal) or `ne` (not equal) operator against a
69 * single un-parenthesized expression with or without quotes or against multiple
70 * parenthesized expressions. Examples: `fieldname eq unquoted literal`
71 * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
72 * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
73 * interpreted as a regular expression using Google RE2 library syntax. The
74 * literal value must match the entire field. For example, to filter for
75 * instances that do not end with name "instance", you would use `name ne
76 * .*instance`. You cannot combine constraints on multiple fields using regular
77 * expressions.
78 * @opt_param bool includeAllScopes Indicates whether every visible scope for
79 * each scope type (zone, region, global) should be included in the response.
80 * For new resource types added after this field, the flag has no effect as new
81 * resource types will always include every visible scope for each scope type in
82 * response. For resource types which predate this field, if this flag is
83 * omitted or false, only scopes of the scope types where the resource type is
84 * expected to be found will be included.
85 * @opt_param string maxResults The maximum number of results per page that
86 * should be returned. If the number of available results is larger than
87 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
88 * get the next page of results in subsequent list requests. Acceptable values
89 * are `0` to `500`, inclusive. (Default: `500`)
90 * @opt_param string orderBy Sorts list results by a certain order. By default,
91 * results are returned in alphanumerical order based on the resource name. You
92 * can also sort results in descending order based on the creation timestamp
93 * using `orderBy="creationTimestamp desc"`. This sorts results based on the
94 * `creationTimestamp` field in reverse chronological order (newest result
95 * first). Use this to sort resources like operations so that the newest
96 * operation is returned first. Currently, only sorting by `name` or
97 * `creationTimestamp desc` is supported.
98 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
99 * the `nextPageToken` returned by a previous list request to get the next page
100 * of results.
101 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
102 * which provides partial results in case of failure. The default value is
103 * false. For example, when partial success behavior is enabled, aggregatedList
104 * for a single zone scope either returns all resources in the zone or no
105 * resources, with an error code.
106 * @opt_param string serviceProjectNumber The Shared VPC service project id or
107 * service project number for which aggregated list request is invoked for
108 * subnetworks list-usable api.
109 * @return TargetTcpProxyAggregatedList
110 * @throws \Google\Service\Exception
111 */
112 public function aggregatedList($project, $optParams = [])
113 {
114 $params = ['project' => $project];
115 $params = array_merge($params, $optParams);
116 return $this->call('aggregatedList', [$params], TargetTcpProxyAggregatedList::class);
117 }
118 /**
119 * Deletes the specified TargetTcpProxy resource. (targetTcpProxies.delete)
120 *
121 * @param string $project Project ID for this request.
122 * @param string $targetTcpProxy Name of the TargetTcpProxy resource to delete.
123 * @param array $optParams Optional parameters.
124 *
125 * @opt_param string requestId An optional request ID to identify requests.
126 * Specify a unique request ID so that if you must retry your request, the
127 * server will know to ignore the request if it has already been completed. For
128 * example, consider a situation where you make an initial request and the
129 * request times out. If you make the request again with the same request ID,
130 * the server can check if original operation with the same request ID was
131 * received, and if so, will ignore the second request. This prevents clients
132 * from accidentally creating duplicate commitments. The request ID must be a
133 * valid UUID with the exception that zero UUID is not supported (
134 * 00000000-0000-0000-0000-000000000000).
135 * @return Operation
136 * @throws \Google\Service\Exception
137 */
138 public function delete($project, $targetTcpProxy, $optParams = [])
139 {
140 $params = ['project' => $project, 'targetTcpProxy' => $targetTcpProxy];
141 $params = array_merge($params, $optParams);
142 return $this->call('delete', [$params], Operation::class);
143 }
144 /**
145 * Returns the specified TargetTcpProxy resource. (targetTcpProxies.get)
146 *
147 * @param string $project Project ID for this request.
148 * @param string $targetTcpProxy Name of the TargetTcpProxy resource to return.
149 * @param array $optParams Optional parameters.
150 * @return TargetTcpProxy
151 * @throws \Google\Service\Exception
152 */
153 public function get($project, $targetTcpProxy, $optParams = [])
154 {
155 $params = ['project' => $project, 'targetTcpProxy' => $targetTcpProxy];
156 $params = array_merge($params, $optParams);
157 return $this->call('get', [$params], TargetTcpProxy::class);
158 }
159 /**
160 * Creates a TargetTcpProxy resource in the specified project using the data
161 * included in the request. (targetTcpProxies.insert)
162 *
163 * @param string $project Project ID for this request.
164 * @param TargetTcpProxy $postBody
165 * @param array $optParams Optional parameters.
166 *
167 * @opt_param string requestId An optional request ID to identify requests.
168 * Specify a unique request ID so that if you must retry your request, the
169 * server will know to ignore the request if it has already been completed. For
170 * example, consider a situation where you make an initial request and the
171 * request times out. If you make the request again with the same request ID,
172 * the server can check if original operation with the same request ID was
173 * received, and if so, will ignore the second request. This prevents clients
174 * from accidentally creating duplicate commitments. The request ID must be a
175 * valid UUID with the exception that zero UUID is not supported (
176 * 00000000-0000-0000-0000-000000000000).
177 * @return Operation
178 * @throws \Google\Service\Exception
179 */
180 public function insert($project, TargetTcpProxy $postBody, $optParams = [])
181 {
182 $params = ['project' => $project, 'postBody' => $postBody];
183 $params = array_merge($params, $optParams);
184 return $this->call('insert', [$params], Operation::class);
185 }
186 /**
187 * Retrieves the list of TargetTcpProxy resources available to the specified
188 * project. (targetTcpProxies.listTargetTcpProxies)
189 *
190 * @param string $project Project ID for this request.
191 * @param array $optParams Optional parameters.
192 *
193 * @opt_param string filter A filter expression that filters resources listed in
194 * the response. Most Compute resources support two types of filter expressions:
195 * expressions that support regular expressions and expressions that follow API
196 * improvement proposal AIP-160. These two types of filter expressions cannot be
197 * mixed in one request. If you want to use AIP-160, your expression must
198 * specify the field name, an operator, and the value that you want to use for
199 * filtering. The value must be a string, a number, or a boolean. The operator
200 * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
201 * are filtering Compute Engine instances, you can exclude instances named
202 * `example-instance` by specifying `name != example-instance`. The `:*`
203 * comparison can be used to test whether a key has been defined. For example,
204 * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
205 * also filter nested fields. For example, you could specify
206 * `scheduling.automaticRestart = false` to include instances only if they are
207 * not scheduled for automatic restarts. You can use filtering on nested fields
208 * to filter based on resource labels. To filter on multiple expressions,
209 * provide each separate expression within parentheses. For example: ```
210 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
211 * default, each expression is an `AND` expression. However, you can include
212 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
213 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
214 * (scheduling.automaticRestart = true) ``` If you want to use a regular
215 * expression, use the `eq` (equal) or `ne` (not equal) operator against a
216 * single un-parenthesized expression with or without quotes or against multiple
217 * parenthesized expressions. Examples: `fieldname eq unquoted literal`
218 * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
219 * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
220 * interpreted as a regular expression using Google RE2 library syntax. The
221 * literal value must match the entire field. For example, to filter for
222 * instances that do not end with name "instance", you would use `name ne
223 * .*instance`. You cannot combine constraints on multiple fields using regular
224 * expressions.
225 * @opt_param string maxResults The maximum number of results per page that
226 * should be returned. If the number of available results is larger than
227 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
228 * get the next page of results in subsequent list requests. Acceptable values
229 * are `0` to `500`, inclusive. (Default: `500`)
230 * @opt_param string orderBy Sorts list results by a certain order. By default,
231 * results are returned in alphanumerical order based on the resource name. You
232 * can also sort results in descending order based on the creation timestamp
233 * using `orderBy="creationTimestamp desc"`. This sorts results based on the
234 * `creationTimestamp` field in reverse chronological order (newest result
235 * first). Use this to sort resources like operations so that the newest
236 * operation is returned first. Currently, only sorting by `name` or
237 * `creationTimestamp desc` is supported.
238 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
239 * the `nextPageToken` returned by a previous list request to get the next page
240 * of results.
241 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
242 * which provides partial results in case of failure. The default value is
243 * false. For example, when partial success behavior is enabled, aggregatedList
244 * for a single zone scope either returns all resources in the zone or no
245 * resources, with an error code.
246 * @return TargetTcpProxyList
247 * @throws \Google\Service\Exception
248 */
249 public function listTargetTcpProxies($project, $optParams = [])
250 {
251 $params = ['project' => $project];
252 $params = array_merge($params, $optParams);
253 return $this->call('list', [$params], TargetTcpProxyList::class);
254 }
255 /**
256 * Changes the BackendService for TargetTcpProxy.
257 * (targetTcpProxies.setBackendService)
258 *
259 * @param string $project Project ID for this request.
260 * @param string $targetTcpProxy Name of the TargetTcpProxy resource whose
261 * BackendService resource is to be set.
262 * @param TargetTcpProxiesSetBackendServiceRequest $postBody
263 * @param array $optParams Optional parameters.
264 *
265 * @opt_param string requestId An optional request ID to identify requests.
266 * Specify a unique request ID so that if you must retry your request, the
267 * server will know to ignore the request if it has already been completed. For
268 * example, consider a situation where you make an initial request and the
269 * request times out. If you make the request again with the same request ID,
270 * the server can check if original operation with the same request ID was
271 * received, and if so, will ignore the second request. This prevents clients
272 * from accidentally creating duplicate commitments. The request ID must be a
273 * valid UUID with the exception that zero UUID is not supported (
274 * 00000000-0000-0000-0000-000000000000).
275 * @return Operation
276 * @throws \Google\Service\Exception
277 */
278 public function setBackendService($project, $targetTcpProxy, TargetTcpProxiesSetBackendServiceRequest $postBody, $optParams = [])
279 {
280 $params = ['project' => $project, 'targetTcpProxy' => $targetTcpProxy, 'postBody' => $postBody];
281 $params = array_merge($params, $optParams);
282 return $this->call('setBackendService', [$params], Operation::class);
283 }
284 /**
285 * Changes the ProxyHeaderType for TargetTcpProxy.
286 * (targetTcpProxies.setProxyHeader)
287 *
288 * @param string $project Project ID for this request.
289 * @param string $targetTcpProxy Name of the TargetTcpProxy resource whose
290 * ProxyHeader is to be set.
291 * @param TargetTcpProxiesSetProxyHeaderRequest $postBody
292 * @param array $optParams Optional parameters.
293 *
294 * @opt_param string requestId An optional request ID to identify requests.
295 * Specify a unique request ID so that if you must retry your request, the
296 * server will know to ignore the request if it has already been completed. For
297 * example, consider a situation where you make an initial request and the
298 * request times out. If you make the request again with the same request ID,
299 * the server can check if original operation with the same request ID was
300 * received, and if so, will ignore the second request. This prevents clients
301 * from accidentally creating duplicate commitments. The request ID must be a
302 * valid UUID with the exception that zero UUID is not supported (
303 * 00000000-0000-0000-0000-000000000000).
304 * @return Operation
305 * @throws \Google\Service\Exception
306 */
307 public function setProxyHeader($project, $targetTcpProxy, TargetTcpProxiesSetProxyHeaderRequest $postBody, $optParams = [])
308 {
309 $params = ['project' => $project, 'targetTcpProxy' => $targetTcpProxy, 'postBody' => $postBody];
310 $params = array_merge($params, $optParams);
311 return $this->call('setProxyHeader', [$params], Operation::class);
312 }
313}
314
315// Adding a class alias for backwards compatibility with the previous class name.
316class_alias(TargetTcpProxies::class, 'Google_Service_Compute_Resource_TargetTcpProxies');
Note: See TracBrowser for help on using the repository browser.