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