source: vendor/google/apiclient-services/src/Networkconnectivity/Resource/ProjectsLocationsNetworkconnectivityGlobalHubs.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 3 months ago

Upload project files

  • Property mode set to 100644
File size: 16.4 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\Networkconnectivity\Resource;
19
20use Google\Service\Networkconnectivity\AcceptHubSpokeRequest;
21use Google\Service\Networkconnectivity\GoogleLongrunningOperation;
22use Google\Service\Networkconnectivity\Hub;
23use Google\Service\Networkconnectivity\ListHubSpokesResponse;
24use Google\Service\Networkconnectivity\ListHubsResponse;
25use Google\Service\Networkconnectivity\Policy;
26use Google\Service\Networkconnectivity\QueryHubStatusResponse;
27use Google\Service\Networkconnectivity\RejectHubSpokeRequest;
28use Google\Service\Networkconnectivity\SetIamPolicyRequest;
29use Google\Service\Networkconnectivity\TestIamPermissionsRequest;
30use Google\Service\Networkconnectivity\TestIamPermissionsResponse;
31
32/**
33 * The "hubs" collection of methods.
34 * Typical usage is:
35 * <code>
36 * $networkconnectivityService = new Google\Service\Networkconnectivity(...);
37 * $hubs = $networkconnectivityService->projects_locations_global_hubs;
38 * </code>
39 */
40class ProjectsLocationsNetworkconnectivityGlobalHubs extends \Google\Service\Resource
41{
42 /**
43 * Accepts a proposal to attach a Network Connectivity Center spoke to a hub.
44 * (hubs.acceptSpoke)
45 *
46 * @param string $name Required. The name of the hub into which to accept the
47 * spoke.
48 * @param AcceptHubSpokeRequest $postBody
49 * @param array $optParams Optional parameters.
50 * @return GoogleLongrunningOperation
51 * @throws \Google\Service\Exception
52 */
53 public function acceptSpoke($name, AcceptHubSpokeRequest $postBody, $optParams = [])
54 {
55 $params = ['name' => $name, 'postBody' => $postBody];
56 $params = array_merge($params, $optParams);
57 return $this->call('acceptSpoke', [$params], GoogleLongrunningOperation::class);
58 }
59 /**
60 * Creates a new Network Connectivity Center hub in the specified project.
61 * (hubs.create)
62 *
63 * @param string $parent Required. The parent resource.
64 * @param Hub $postBody
65 * @param array $optParams Optional parameters.
66 *
67 * @opt_param string hubId Required. A unique identifier for the hub.
68 * @opt_param string requestId Optional. A request ID to identify requests.
69 * Specify a unique request ID so that if you must retry your request, the
70 * server knows to ignore the request if it has already been completed. The
71 * server guarantees that a request doesn't result in creation of duplicate
72 * commitments for at least 60 minutes. For example, consider a situation where
73 * you make an initial request and the request times out. If you make the
74 * request again with the same request ID, the server can check to see whether
75 * the original operation was received. If it was, the server ignores the second
76 * request. This behavior prevents clients from mistakenly creating duplicate
77 * commitments. The request ID must be a valid UUID, with the exception that
78 * zero UUID is not supported (00000000-0000-0000-0000-000000000000).
79 * @return GoogleLongrunningOperation
80 * @throws \Google\Service\Exception
81 */
82 public function create($parent, Hub $postBody, $optParams = [])
83 {
84 $params = ['parent' => $parent, 'postBody' => $postBody];
85 $params = array_merge($params, $optParams);
86 return $this->call('create', [$params], GoogleLongrunningOperation::class);
87 }
88 /**
89 * Deletes a Network Connectivity Center hub. (hubs.delete)
90 *
91 * @param string $name Required. The name of the hub to delete.
92 * @param array $optParams Optional parameters.
93 *
94 * @opt_param string requestId Optional. A request ID to identify requests.
95 * Specify a unique request ID so that if you must retry your request, the
96 * server knows to ignore the request if it has already been completed. The
97 * server guarantees that a request doesn't result in creation of duplicate
98 * commitments for at least 60 minutes. For example, consider a situation where
99 * you make an initial request and the request times out. If you make the
100 * request again with the same request ID, the server can check to see whether
101 * the original operation was received. If it was, the server ignores the second
102 * request. This behavior prevents clients from mistakenly creating duplicate
103 * commitments. The request ID must be a valid UUID, with the exception that
104 * zero UUID is not supported (00000000-0000-0000-0000-000000000000).
105 * @return GoogleLongrunningOperation
106 * @throws \Google\Service\Exception
107 */
108 public function delete($name, $optParams = [])
109 {
110 $params = ['name' => $name];
111 $params = array_merge($params, $optParams);
112 return $this->call('delete', [$params], GoogleLongrunningOperation::class);
113 }
114 /**
115 * Gets details about a Network Connectivity Center hub. (hubs.get)
116 *
117 * @param string $name Required. The name of the hub resource to get.
118 * @param array $optParams Optional parameters.
119 * @return Hub
120 * @throws \Google\Service\Exception
121 */
122 public function get($name, $optParams = [])
123 {
124 $params = ['name' => $name];
125 $params = array_merge($params, $optParams);
126 return $this->call('get', [$params], Hub::class);
127 }
128 /**
129 * Gets the access control policy for a resource. Returns an empty policy if the
130 * resource exists and does not have a policy set. (hubs.getIamPolicy)
131 *
132 * @param string $resource REQUIRED: The resource for which the policy is being
133 * requested. See [Resource
134 * names](https://cloud.google.com/apis/design/resource_names) for the
135 * appropriate value for this field.
136 * @param array $optParams Optional parameters.
137 *
138 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
139 * version that will be used to format the policy. Valid values are 0, 1, and 3.
140 * Requests specifying an invalid value will be rejected. Requests for policies
141 * with any conditional role bindings must specify version 3. Policies with no
142 * conditional role bindings may specify any valid value or leave the field
143 * unset. The policy in the response might use the policy version that you
144 * specified, or it might use a lower policy version. For example, if you
145 * specify version 3, but the policy has no conditional role bindings, the
146 * response uses version 1. To learn which resources support conditions in their
147 * IAM policies, see the [IAM
148 * documentation](https://cloud.google.com/iam/help/conditions/resource-
149 * policies).
150 * @return Policy
151 * @throws \Google\Service\Exception
152 */
153 public function getIamPolicy($resource, $optParams = [])
154 {
155 $params = ['resource' => $resource];
156 $params = array_merge($params, $optParams);
157 return $this->call('getIamPolicy', [$params], Policy::class);
158 }
159 /**
160 * Lists the Network Connectivity Center hubs associated with a given project.
161 * (hubs.listProjectsLocationsNetworkconnectivityGlobalHubs)
162 *
163 * @param string $parent Required. The parent resource's name.
164 * @param array $optParams Optional parameters.
165 *
166 * @opt_param string filter An expression that filters the list of results.
167 * @opt_param string orderBy Sort the results by a certain order.
168 * @opt_param int pageSize The maximum number of results per page to return.
169 * @opt_param string pageToken The page token.
170 * @return ListHubsResponse
171 * @throws \Google\Service\Exception
172 */
173 public function listProjectsLocationsNetworkconnectivityGlobalHubs($parent, $optParams = [])
174 {
175 $params = ['parent' => $parent];
176 $params = array_merge($params, $optParams);
177 return $this->call('list', [$params], ListHubsResponse::class);
178 }
179 /**
180 * Lists the Network Connectivity Center spokes associated with a specified hub
181 * and location. The list includes both spokes that are attached to the hub and
182 * spokes that have been proposed but not yet accepted. (hubs.listSpokes)
183 *
184 * @param string $name Required. The name of the hub.
185 * @param array $optParams Optional parameters.
186 *
187 * @opt_param string filter An expression that filters the list of results.
188 * @opt_param string orderBy Sort the results by name or create_time.
189 * @opt_param int pageSize The maximum number of results to return per page.
190 * @opt_param string pageToken The page token.
191 * @opt_param string spokeLocations A list of locations. Specify one of the
192 * following: `[global]`, a single region (for example, `[us-central1]`), or a
193 * combination of values (for example, `[global, us-central1, us-west1]`). If
194 * the spoke_locations field is populated, the list of results includes only
195 * spokes in the specified location. If the spoke_locations field is not
196 * populated, the list of results includes spokes in all locations.
197 * @opt_param string view The view of the spoke to return. The view that you use
198 * determines which spoke fields are included in the response.
199 * @return ListHubSpokesResponse
200 * @throws \Google\Service\Exception
201 */
202 public function listSpokes($name, $optParams = [])
203 {
204 $params = ['name' => $name];
205 $params = array_merge($params, $optParams);
206 return $this->call('listSpokes', [$params], ListHubSpokesResponse::class);
207 }
208 /**
209 * Updates the description and/or labels of a Network Connectivity Center hub.
210 * (hubs.patch)
211 *
212 * @param string $name Immutable. The name of the hub. Hub names must be unique.
213 * They use the following form:
214 * `projects/{project_number}/locations/global/hubs/{hub_id}`
215 * @param Hub $postBody
216 * @param array $optParams Optional parameters.
217 *
218 * @opt_param string requestId Optional. A request ID to identify requests.
219 * Specify a unique request ID so that if you must retry your request, the
220 * server knows to ignore the request if it has already been completed. The
221 * server guarantees that a request doesn't result in creation of duplicate
222 * commitments for at least 60 minutes. For example, consider a situation where
223 * you make an initial request and the request times out. If you make the
224 * request again with the same request ID, the server can check to see whether
225 * the original operation was received. If it was, the server ignores the second
226 * request. This behavior prevents clients from mistakenly creating duplicate
227 * commitments. The request ID must be a valid UUID, with the exception that
228 * zero UUID is not supported (00000000-0000-0000-0000-000000000000).
229 * @opt_param string updateMask Optional. In the case of an update to an
230 * existing hub, field mask is used to specify the fields to be overwritten. The
231 * fields specified in the update_mask are relative to the resource, not the
232 * full request. A field is overwritten if it is in the mask. If the user does
233 * not provide a mask, then all fields are overwritten.
234 * @return GoogleLongrunningOperation
235 * @throws \Google\Service\Exception
236 */
237 public function patch($name, Hub $postBody, $optParams = [])
238 {
239 $params = ['name' => $name, 'postBody' => $postBody];
240 $params = array_merge($params, $optParams);
241 return $this->call('patch', [$params], GoogleLongrunningOperation::class);
242 }
243 /**
244 * Query PSC propagation status the status of a Network Connectivity Center hub.
245 * (hubs.queryStatus)
246 *
247 * @param string $name Required. The name of the hub.
248 * @param array $optParams Optional parameters.
249 *
250 * @opt_param string filter Optional. An expression that filters the list of
251 * results. The filter can be used to filter the results by the following
252 * fields: * psc_propagation_status.source_spoke *
253 * psc_propagation_status.source_group *
254 * psc_propagation_status.source_forwarding_rule *
255 * psc_propagation_status.target_spoke * psc_propagation_status.target_group *
256 * psc_propagation_status.code * psc_propagation_status.message
257 * @opt_param string groupBy Optional. A field that counts are grouped by. A
258 * comma-separated list of any of these fields: *
259 * psc_propagation_status.source_spoke * psc_propagation_status.source_group *
260 * psc_propagation_status.source_forwarding_rule *
261 * psc_propagation_status.target_spoke * psc_propagation_status.target_group *
262 * psc_propagation_status.code
263 * @opt_param string orderBy Optional. Sort the results in the ascending order
264 * by specific fields returned in the response. A comma-separated list of any of
265 * these fields: * psc_propagation_status.source_spoke *
266 * psc_propagation_status.source_group *
267 * psc_propagation_status.source_forwarding_rule *
268 * psc_propagation_status.target_spoke * psc_propagation_status.target_group *
269 * psc_propagation_status.code If `group_by` is set, the value of the `order_by`
270 * field must be the same as or a subset of the `group_by` field.
271 * @opt_param int pageSize Optional. The maximum number of results to return per
272 * page.
273 * @opt_param string pageToken Optional. The page token.
274 * @return QueryHubStatusResponse
275 * @throws \Google\Service\Exception
276 */
277 public function queryStatus($name, $optParams = [])
278 {
279 $params = ['name' => $name];
280 $params = array_merge($params, $optParams);
281 return $this->call('queryStatus', [$params], QueryHubStatusResponse::class);
282 }
283 /**
284 * Rejects a Network Connectivity Center spoke from being attached to a hub. If
285 * the spoke was previously in the `ACTIVE` state, it transitions to the
286 * `INACTIVE` state and is no longer able to connect to other spokes that are
287 * attached to the hub. (hubs.rejectSpoke)
288 *
289 * @param string $name Required. The name of the hub from which to reject the
290 * spoke.
291 * @param RejectHubSpokeRequest $postBody
292 * @param array $optParams Optional parameters.
293 * @return GoogleLongrunningOperation
294 * @throws \Google\Service\Exception
295 */
296 public function rejectSpoke($name, RejectHubSpokeRequest $postBody, $optParams = [])
297 {
298 $params = ['name' => $name, 'postBody' => $postBody];
299 $params = array_merge($params, $optParams);
300 return $this->call('rejectSpoke', [$params], GoogleLongrunningOperation::class);
301 }
302 /**
303 * Sets the access control policy on the specified resource. Replaces any
304 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
305 * `PERMISSION_DENIED` errors. (hubs.setIamPolicy)
306 *
307 * @param string $resource REQUIRED: The resource for which the policy is being
308 * specified. See [Resource
309 * names](https://cloud.google.com/apis/design/resource_names) for the
310 * appropriate value for this field.
311 * @param SetIamPolicyRequest $postBody
312 * @param array $optParams Optional parameters.
313 * @return Policy
314 * @throws \Google\Service\Exception
315 */
316 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
317 {
318 $params = ['resource' => $resource, 'postBody' => $postBody];
319 $params = array_merge($params, $optParams);
320 return $this->call('setIamPolicy', [$params], Policy::class);
321 }
322 /**
323 * Returns permissions that a caller has on the specified resource. If the
324 * resource does not exist, this will return an empty set of permissions, not a
325 * `NOT_FOUND` error. Note: This operation is designed to be used for building
326 * permission-aware UIs and command-line tools, not for authorization checking.
327 * This operation may "fail open" without warning. (hubs.testIamPermissions)
328 *
329 * @param string $resource REQUIRED: The resource for which the policy detail is
330 * being requested. See [Resource
331 * names](https://cloud.google.com/apis/design/resource_names) for the
332 * appropriate value for this field.
333 * @param TestIamPermissionsRequest $postBody
334 * @param array $optParams Optional parameters.
335 * @return TestIamPermissionsResponse
336 * @throws \Google\Service\Exception
337 */
338 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
339 {
340 $params = ['resource' => $resource, 'postBody' => $postBody];
341 $params = array_merge($params, $optParams);
342 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
343 }
344}
345
346// Adding a class alias for backwards compatibility with the previous class name.
347class_alias(ProjectsLocationsNetworkconnectivityGlobalHubs::class, 'Google_Service_Networkconnectivity_Resource_ProjectsLocationsNetworkconnectivityGlobalHubs');
Note: See TracBrowser for help on using the repository browser.