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