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

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

Upload new project files

  • Property mode set to 100644
File size: 17.1 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\PacketMirroring;
22use Google\Service\Compute\PacketMirroringAggregatedList;
23use Google\Service\Compute\PacketMirroringList;
24use Google\Service\Compute\TestPermissionsRequest;
25use Google\Service\Compute\TestPermissionsResponse;
26
27/**
28 * The "packetMirrorings" collection of methods.
29 * Typical usage is:
30 * <code>
31 * $computeService = new Google\Service\Compute(...);
32 * $packetMirrorings = $computeService->packetMirrorings;
33 * </code>
34 */
35class PacketMirrorings extends \Google\Service\Resource
36{
37 /**
38 * Retrieves an aggregated list of packetMirrorings. To prevent failure, Google
39 * recommends that you set the `returnPartialSuccess` parameter to `true`.
40 * (packetMirrorings.aggregatedList)
41 *
42 * @param string $project Project ID for 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 PacketMirroringAggregatedList
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], PacketMirroringAggregatedList::class);
116 }
117 /**
118 * Deletes the specified PacketMirroring resource. (packetMirrorings.delete)
119 *
120 * @param string $project Project ID for this request.
121 * @param string $region Name of the region for this request.
122 * @param string $packetMirroring Name of the PacketMirroring resource to
123 * delete.
124 * @param array $optParams Optional parameters.
125 *
126 * @opt_param string requestId An optional request ID to identify requests.
127 * Specify a unique request ID so that if you must retry your request, the
128 * server will know to ignore the request if it has already been completed. For
129 * example, consider a situation where you make an initial request and the
130 * request times out. If you make the request again with the same request ID,
131 * the server can check if original operation with the same request ID was
132 * received, and if so, will ignore the second request. This prevents clients
133 * from accidentally creating duplicate commitments. The request ID must be a
134 * valid UUID with the exception that zero UUID is not supported (
135 * 00000000-0000-0000-0000-000000000000).
136 * @return Operation
137 * @throws \Google\Service\Exception
138 */
139 public function delete($project, $region, $packetMirroring, $optParams = [])
140 {
141 $params = ['project' => $project, 'region' => $region, 'packetMirroring' => $packetMirroring];
142 $params = array_merge($params, $optParams);
143 return $this->call('delete', [$params], Operation::class);
144 }
145 /**
146 * Returns the specified PacketMirroring resource. (packetMirrorings.get)
147 *
148 * @param string $project Project ID for this request.
149 * @param string $region Name of the region for this request.
150 * @param string $packetMirroring Name of the PacketMirroring resource to
151 * return.
152 * @param array $optParams Optional parameters.
153 * @return PacketMirroring
154 * @throws \Google\Service\Exception
155 */
156 public function get($project, $region, $packetMirroring, $optParams = [])
157 {
158 $params = ['project' => $project, 'region' => $region, 'packetMirroring' => $packetMirroring];
159 $params = array_merge($params, $optParams);
160 return $this->call('get', [$params], PacketMirroring::class);
161 }
162 /**
163 * Creates a PacketMirroring resource in the specified project and region using
164 * the data included in the request. (packetMirrorings.insert)
165 *
166 * @param string $project Project ID for this request.
167 * @param string $region Name of the region for this request.
168 * @param PacketMirroring $postBody
169 * @param array $optParams Optional parameters.
170 *
171 * @opt_param string requestId An optional request ID to identify requests.
172 * Specify a unique request ID so that if you must retry your request, the
173 * server will know to ignore the request if it has already been completed. For
174 * example, consider a situation where you make an initial request and the
175 * request times out. If you make the request again with the same request ID,
176 * the server can check if original operation with the same request ID was
177 * received, and if so, will ignore the second request. This prevents clients
178 * from accidentally creating duplicate commitments. The request ID must be a
179 * valid UUID with the exception that zero UUID is not supported (
180 * 00000000-0000-0000-0000-000000000000).
181 * @return Operation
182 * @throws \Google\Service\Exception
183 */
184 public function insert($project, $region, PacketMirroring $postBody, $optParams = [])
185 {
186 $params = ['project' => $project, 'region' => $region, 'postBody' => $postBody];
187 $params = array_merge($params, $optParams);
188 return $this->call('insert', [$params], Operation::class);
189 }
190 /**
191 * Retrieves a list of PacketMirroring resources available to the specified
192 * project and region. (packetMirrorings.listPacketMirrorings)
193 *
194 * @param string $project Project ID for this request.
195 * @param string $region Name of the region for this request.
196 * @param array $optParams Optional parameters.
197 *
198 * @opt_param string filter A filter expression that filters resources listed in
199 * the response. Most Compute resources support two types of filter expressions:
200 * expressions that support regular expressions and expressions that follow API
201 * improvement proposal AIP-160. These two types of filter expressions cannot be
202 * mixed in one request. If you want to use AIP-160, your expression must
203 * specify the field name, an operator, and the value that you want to use for
204 * filtering. The value must be a string, a number, or a boolean. The operator
205 * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
206 * are filtering Compute Engine instances, you can exclude instances named
207 * `example-instance` by specifying `name != example-instance`. The `:*`
208 * comparison can be used to test whether a key has been defined. For example,
209 * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
210 * also filter nested fields. For example, you could specify
211 * `scheduling.automaticRestart = false` to include instances only if they are
212 * not scheduled for automatic restarts. You can use filtering on nested fields
213 * to filter based on resource labels. To filter on multiple expressions,
214 * provide each separate expression within parentheses. For example: ```
215 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
216 * default, each expression is an `AND` expression. However, you can include
217 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
218 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
219 * (scheduling.automaticRestart = true) ``` If you want to use a regular
220 * expression, use the `eq` (equal) or `ne` (not equal) operator against a
221 * single un-parenthesized expression with or without quotes or against multiple
222 * parenthesized expressions. Examples: `fieldname eq unquoted literal`
223 * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
224 * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
225 * interpreted as a regular expression using Google RE2 library syntax. The
226 * literal value must match the entire field. For example, to filter for
227 * instances that do not end with name "instance", you would use `name ne
228 * .*instance`. You cannot combine constraints on multiple fields using regular
229 * expressions.
230 * @opt_param string maxResults The maximum number of results per page that
231 * should be returned. If the number of available results is larger than
232 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
233 * get the next page of results in subsequent list requests. Acceptable values
234 * are `0` to `500`, inclusive. (Default: `500`)
235 * @opt_param string orderBy Sorts list results by a certain order. By default,
236 * results are returned in alphanumerical order based on the resource name. You
237 * can also sort results in descending order based on the creation timestamp
238 * using `orderBy="creationTimestamp desc"`. This sorts results based on the
239 * `creationTimestamp` field in reverse chronological order (newest result
240 * first). Use this to sort resources like operations so that the newest
241 * operation is returned first. Currently, only sorting by `name` or
242 * `creationTimestamp desc` is supported.
243 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
244 * the `nextPageToken` returned by a previous list request to get the next page
245 * of results.
246 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
247 * which provides partial results in case of failure. The default value is
248 * false. For example, when partial success behavior is enabled, aggregatedList
249 * for a single zone scope either returns all resources in the zone or no
250 * resources, with an error code.
251 * @return PacketMirroringList
252 * @throws \Google\Service\Exception
253 */
254 public function listPacketMirrorings($project, $region, $optParams = [])
255 {
256 $params = ['project' => $project, 'region' => $region];
257 $params = array_merge($params, $optParams);
258 return $this->call('list', [$params], PacketMirroringList::class);
259 }
260 /**
261 * Patches the specified PacketMirroring resource with the data included in the
262 * request. This method supports PATCH semantics and uses JSON merge patch
263 * format and processing rules. (packetMirrorings.patch)
264 *
265 * @param string $project Project ID for this request.
266 * @param string $region Name of the region for this request.
267 * @param string $packetMirroring Name of the PacketMirroring resource to patch.
268 * @param PacketMirroring $postBody
269 * @param array $optParams Optional parameters.
270 *
271 * @opt_param string requestId An optional request ID to identify requests.
272 * Specify a unique request ID so that if you must retry your request, the
273 * server will know to ignore the request if it has already been completed. For
274 * example, consider a situation where you make an initial request and the
275 * request times out. If you make the request again with the same request ID,
276 * the server can check if original operation with the same request ID was
277 * received, and if so, will ignore the second request. This prevents clients
278 * from accidentally creating duplicate commitments. The request ID must be a
279 * valid UUID with the exception that zero UUID is not supported (
280 * 00000000-0000-0000-0000-000000000000).
281 * @return Operation
282 * @throws \Google\Service\Exception
283 */
284 public function patch($project, $region, $packetMirroring, PacketMirroring $postBody, $optParams = [])
285 {
286 $params = ['project' => $project, 'region' => $region, 'packetMirroring' => $packetMirroring, 'postBody' => $postBody];
287 $params = array_merge($params, $optParams);
288 return $this->call('patch', [$params], Operation::class);
289 }
290 /**
291 * Returns permissions that a caller has on the specified resource.
292 * (packetMirrorings.testIamPermissions)
293 *
294 * @param string $project Project ID for this request.
295 * @param string $region The name of the region for this request.
296 * @param string $resource Name or id of the resource for this request.
297 * @param TestPermissionsRequest $postBody
298 * @param array $optParams Optional parameters.
299 * @return TestPermissionsResponse
300 * @throws \Google\Service\Exception
301 */
302 public function testIamPermissions($project, $region, $resource, TestPermissionsRequest $postBody, $optParams = [])
303 {
304 $params = ['project' => $project, 'region' => $region, 'resource' => $resource, 'postBody' => $postBody];
305 $params = array_merge($params, $optParams);
306 return $this->call('testIamPermissions', [$params], TestPermissionsResponse::class);
307 }
308}
309
310// Adding a class alias for backwards compatibility with the previous class name.
311class_alias(PacketMirrorings::class, 'Google_Service_Compute_Resource_PacketMirrorings');
Note: See TracBrowser for help on using the repository browser.