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