source: vendor/google/apiclient-services/src/Compute/Resource/UrlMaps.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: 19.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\CacheInvalidationRule;
21use Google\Service\Compute\Operation;
22use Google\Service\Compute\UrlMap;
23use Google\Service\Compute\UrlMapList;
24use Google\Service\Compute\UrlMapsAggregatedList;
25use Google\Service\Compute\UrlMapsValidateRequest;
26use Google\Service\Compute\UrlMapsValidateResponse;
27
28/**
29 * The "urlMaps" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $computeService = new Google\Service\Compute(...);
33 * $urlMaps = $computeService->urlMaps;
34 * </code>
35 */
36class UrlMaps extends \Google\Service\Resource
37{
38 /**
39 * Retrieves the list of all UrlMap resources, regional and global, available to
40 * the specified project. To prevent failure, Google recommends that you set the
41 * `returnPartialSuccess` parameter to `true`. (urlMaps.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 UrlMapsAggregatedList
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], UrlMapsAggregatedList::class);
117 }
118 /**
119 * Deletes the specified UrlMap resource. (urlMaps.delete)
120 *
121 * @param string $project Project ID for this request.
122 * @param string $urlMap Name of the UrlMap 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, $urlMap, $optParams = [])
139 {
140 $params = ['project' => $project, 'urlMap' => $urlMap];
141 $params = array_merge($params, $optParams);
142 return $this->call('delete', [$params], Operation::class);
143 }
144 /**
145 * Returns the specified UrlMap resource. (urlMaps.get)
146 *
147 * @param string $project Project ID for this request.
148 * @param string $urlMap Name of the UrlMap resource to return.
149 * @param array $optParams Optional parameters.
150 * @return UrlMap
151 * @throws \Google\Service\Exception
152 */
153 public function get($project, $urlMap, $optParams = [])
154 {
155 $params = ['project' => $project, 'urlMap' => $urlMap];
156 $params = array_merge($params, $optParams);
157 return $this->call('get', [$params], UrlMap::class);
158 }
159 /**
160 * Creates a UrlMap resource in the specified project using the data included in
161 * the request. (urlMaps.insert)
162 *
163 * @param string $project Project ID for this request.
164 * @param UrlMap $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, UrlMap $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 * Initiates a cache invalidation operation, invalidating the specified path,
188 * scoped to the specified UrlMap. For more information, see [Invalidating
189 * cached content](/cdn/docs/invalidating-cached-content).
190 * (urlMaps.invalidateCache)
191 *
192 * @param string $project Project ID for this request.
193 * @param string $urlMap Name of the UrlMap scoping this request.
194 * @param CacheInvalidationRule $postBody
195 * @param array $optParams Optional parameters.
196 *
197 * @opt_param string requestId An optional request ID to identify requests.
198 * Specify a unique request ID so that if you must retry your request, the
199 * server will know to ignore the request if it has already been completed. For
200 * example, consider a situation where you make an initial request and the
201 * request times out. If you make the request again with the same request ID,
202 * the server can check if original operation with the same request ID was
203 * received, and if so, will ignore the second request. This prevents clients
204 * from accidentally creating duplicate commitments. The request ID must be a
205 * valid UUID with the exception that zero UUID is not supported (
206 * 00000000-0000-0000-0000-000000000000).
207 * @return Operation
208 * @throws \Google\Service\Exception
209 */
210 public function invalidateCache($project, $urlMap, CacheInvalidationRule $postBody, $optParams = [])
211 {
212 $params = ['project' => $project, 'urlMap' => $urlMap, 'postBody' => $postBody];
213 $params = array_merge($params, $optParams);
214 return $this->call('invalidateCache', [$params], Operation::class);
215 }
216 /**
217 * Retrieves the list of UrlMap resources available to the specified project.
218 * (urlMaps.listUrlMaps)
219 *
220 * @param string $project Project ID for this request.
221 * @param array $optParams Optional parameters.
222 *
223 * @opt_param string filter A filter expression that filters resources listed in
224 * the response. Most Compute resources support two types of filter expressions:
225 * expressions that support regular expressions and expressions that follow API
226 * improvement proposal AIP-160. These two types of filter expressions cannot be
227 * mixed in one request. If you want to use AIP-160, your expression must
228 * specify the field name, an operator, and the value that you want to use for
229 * filtering. The value must be a string, a number, or a boolean. The operator
230 * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
231 * are filtering Compute Engine instances, you can exclude instances named
232 * `example-instance` by specifying `name != example-instance`. The `:*`
233 * comparison can be used to test whether a key has been defined. For example,
234 * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
235 * also filter nested fields. For example, you could specify
236 * `scheduling.automaticRestart = false` to include instances only if they are
237 * not scheduled for automatic restarts. You can use filtering on nested fields
238 * to filter based on resource labels. To filter on multiple expressions,
239 * provide each separate expression within parentheses. For example: ```
240 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
241 * default, each expression is an `AND` expression. However, you can include
242 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
243 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
244 * (scheduling.automaticRestart = true) ``` If you want to use a regular
245 * expression, use the `eq` (equal) or `ne` (not equal) operator against a
246 * single un-parenthesized expression with or without quotes or against multiple
247 * parenthesized expressions. Examples: `fieldname eq unquoted literal`
248 * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
249 * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
250 * interpreted as a regular expression using Google RE2 library syntax. The
251 * literal value must match the entire field. For example, to filter for
252 * instances that do not end with name "instance", you would use `name ne
253 * .*instance`. You cannot combine constraints on multiple fields using regular
254 * expressions.
255 * @opt_param string maxResults The maximum number of results per page that
256 * should be returned. If the number of available results is larger than
257 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
258 * get the next page of results in subsequent list requests. Acceptable values
259 * are `0` to `500`, inclusive. (Default: `500`)
260 * @opt_param string orderBy Sorts list results by a certain order. By default,
261 * results are returned in alphanumerical order based on the resource name. You
262 * can also sort results in descending order based on the creation timestamp
263 * using `orderBy="creationTimestamp desc"`. This sorts results based on the
264 * `creationTimestamp` field in reverse chronological order (newest result
265 * first). Use this to sort resources like operations so that the newest
266 * operation is returned first. Currently, only sorting by `name` or
267 * `creationTimestamp desc` is supported.
268 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
269 * the `nextPageToken` returned by a previous list request to get the next page
270 * of results.
271 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
272 * which provides partial results in case of failure. The default value is
273 * false. For example, when partial success behavior is enabled, aggregatedList
274 * for a single zone scope either returns all resources in the zone or no
275 * resources, with an error code.
276 * @return UrlMapList
277 * @throws \Google\Service\Exception
278 */
279 public function listUrlMaps($project, $optParams = [])
280 {
281 $params = ['project' => $project];
282 $params = array_merge($params, $optParams);
283 return $this->call('list', [$params], UrlMapList::class);
284 }
285 /**
286 * Patches the specified UrlMap resource with the data included in the request.
287 * This method supports PATCH semantics and uses the JSON merge patch format and
288 * processing rules. (urlMaps.patch)
289 *
290 * @param string $project Project ID for this request.
291 * @param string $urlMap Name of the UrlMap resource to patch.
292 * @param UrlMap $postBody
293 * @param array $optParams Optional parameters.
294 *
295 * @opt_param string requestId An optional request ID to identify requests.
296 * Specify a unique request ID so that if you must retry your request, the
297 * server will know to ignore the request if it has already been completed. For
298 * example, consider a situation where you make an initial request and the
299 * request times out. If you make the request again with the same request ID,
300 * the server can check if original operation with the same request ID was
301 * received, and if so, will ignore the second request. This prevents clients
302 * from accidentally creating duplicate commitments. The request ID must be a
303 * valid UUID with the exception that zero UUID is not supported (
304 * 00000000-0000-0000-0000-000000000000).
305 * @return Operation
306 * @throws \Google\Service\Exception
307 */
308 public function patch($project, $urlMap, UrlMap $postBody, $optParams = [])
309 {
310 $params = ['project' => $project, 'urlMap' => $urlMap, 'postBody' => $postBody];
311 $params = array_merge($params, $optParams);
312 return $this->call('patch', [$params], Operation::class);
313 }
314 /**
315 * Updates the specified UrlMap resource with the data included in the request.
316 * (urlMaps.update)
317 *
318 * @param string $project Project ID for this request.
319 * @param string $urlMap Name of the UrlMap resource to update.
320 * @param UrlMap $postBody
321 * @param array $optParams Optional parameters.
322 *
323 * @opt_param string requestId An optional request ID to identify requests.
324 * Specify a unique request ID so that if you must retry your request, the
325 * server will know to ignore the request if it has already been completed. For
326 * example, consider a situation where you make an initial request and the
327 * request times out. If you make the request again with the same request ID,
328 * the server can check if original operation with the same request ID was
329 * received, and if so, will ignore the second request. This prevents clients
330 * from accidentally creating duplicate commitments. The request ID must be a
331 * valid UUID with the exception that zero UUID is not supported (
332 * 00000000-0000-0000-0000-000000000000).
333 * @return Operation
334 * @throws \Google\Service\Exception
335 */
336 public function update($project, $urlMap, UrlMap $postBody, $optParams = [])
337 {
338 $params = ['project' => $project, 'urlMap' => $urlMap, 'postBody' => $postBody];
339 $params = array_merge($params, $optParams);
340 return $this->call('update', [$params], Operation::class);
341 }
342 /**
343 * Runs static validation for the UrlMap. In particular, the tests of the
344 * provided UrlMap will be run. Calling this method does NOT create the UrlMap.
345 * (urlMaps.validate)
346 *
347 * @param string $project Project ID for this request.
348 * @param string $urlMap Name of the UrlMap resource to be validated as.
349 * @param UrlMapsValidateRequest $postBody
350 * @param array $optParams Optional parameters.
351 * @return UrlMapsValidateResponse
352 * @throws \Google\Service\Exception
353 */
354 public function validate($project, $urlMap, UrlMapsValidateRequest $postBody, $optParams = [])
355 {
356 $params = ['project' => $project, 'urlMap' => $urlMap, 'postBody' => $postBody];
357 $params = array_merge($params, $optParams);
358 return $this->call('validate', [$params], UrlMapsValidateResponse::class);
359 }
360}
361
362// Adding a class alias for backwards compatibility with the previous class name.
363class_alias(UrlMaps::class, 'Google_Service_Compute_Resource_UrlMaps');
Note: See TracBrowser for help on using the repository browser.