source: vendor/google/apiclient-services/src/Compute/Resource/TargetHttpProxies.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

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