google-apis-networkconnectivity_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1066 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module NetworkconnectivityV1
23
+ # Network Connectivity API
24
+ #
25
+ # The Network Connectivity API provides access to Network Connectivity Center.
26
+ #
27
+ # @example
28
+ # require 'google/apis/networkconnectivity_v1'
29
+ #
30
+ # Networkconnectivity = Google::Apis::NetworkconnectivityV1 # Alias the module
31
+ # service = Networkconnectivity::NetworkconnectivityService.new
32
+ #
33
+ # @see https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest
34
+ class NetworkconnectivityService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://networkconnectivity.googleapis.com/', '',
47
+ client_name: 'google-apis-networkconnectivity_v1',
48
+ client_version: Google::Apis::NetworkconnectivityV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Gets information about a location.
53
+ # @param [String] name
54
+ # Resource name for the location.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::Location] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::NetworkconnectivityV1::Location]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:get, 'v1/{+name}', options)
74
+ command.response_representation = Google::Apis::NetworkconnectivityV1::Location::Representation
75
+ command.response_class = Google::Apis::NetworkconnectivityV1::Location
76
+ command.params['name'] = name unless name.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ execute_or_queue_command(command, &block)
80
+ end
81
+
82
+ # Lists information about the supported locations for this service.
83
+ # @param [String] name
84
+ # The resource that owns the locations collection, if applicable.
85
+ # @param [String] filter
86
+ # A filter to narrow down results to a preferred subset. The filtering language
87
+ # accepts strings like "displayName=tokyo", and is documented in more detail in [
88
+ # AIP-160](https://google.aip.dev/160).
89
+ # @param [Fixnum] page_size
90
+ # The maximum number of results to return. If not set, the service selects a
91
+ # default.
92
+ # @param [String] page_token
93
+ # A page token received from the `next_page_token` field in the response. Send
94
+ # that page token to receive the subsequent page.
95
+ # @param [String] fields
96
+ # Selector specifying which fields to include in a partial response.
97
+ # @param [String] quota_user
98
+ # Available to use for quota purposes for server-side applications. Can be any
99
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
100
+ # @param [Google::Apis::RequestOptions] options
101
+ # Request-specific options
102
+ #
103
+ # @yield [result, err] Result & error if block supplied
104
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListLocationsResponse] parsed result object
105
+ # @yieldparam err [StandardError] error object if request failed
106
+ #
107
+ # @return [Google::Apis::NetworkconnectivityV1::ListLocationsResponse]
108
+ #
109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
112
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
113
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
114
+ command.response_representation = Google::Apis::NetworkconnectivityV1::ListLocationsResponse::Representation
115
+ command.response_class = Google::Apis::NetworkconnectivityV1::ListLocationsResponse
116
+ command.params['name'] = name unless name.nil?
117
+ command.query['filter'] = filter unless filter.nil?
118
+ command.query['pageSize'] = page_size unless page_size.nil?
119
+ command.query['pageToken'] = page_token unless page_token.nil?
120
+ command.query['fields'] = fields unless fields.nil?
121
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
122
+ execute_or_queue_command(command, &block)
123
+ end
124
+
125
+ # Creates a new hub in the specified project.
126
+ # @param [String] parent
127
+ # Required. The parent resource.
128
+ # @param [Google::Apis::NetworkconnectivityV1::Hub] hub_object
129
+ # @param [String] hub_id
130
+ # Optional. A unique identifier for the hub.
131
+ # @param [String] request_id
132
+ # Optional. A unique request ID (optional). If you specify this ID, you can use
133
+ # it in cases when you need to retry your request. When you need to retry, this
134
+ # ID lets the server know that it can ignore the request if it has already been
135
+ # completed. The server guarantees that for at least 60 minutes after the first
136
+ # request. For example, consider a situation where you make an initial request
137
+ # and the request times out. If you make the request again with the same request
138
+ # ID, the server can check to see whether the original operation was received.
139
+ # If it was, the server ignores the second request. This behavior prevents
140
+ # clients from mistakenly creating duplicate commitments. The request ID must be
141
+ # a valid UUID, with the exception that zero UUID is not supported (00000000-
142
+ # 0000-0000-0000-000000000000).
143
+ # @param [String] fields
144
+ # Selector specifying which fields to include in a partial response.
145
+ # @param [String] quota_user
146
+ # Available to use for quota purposes for server-side applications. Can be any
147
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
148
+ # @param [Google::Apis::RequestOptions] options
149
+ # Request-specific options
150
+ #
151
+ # @yield [result, err] Result & error if block supplied
152
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object
153
+ # @yieldparam err [StandardError] error object if request failed
154
+ #
155
+ # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation]
156
+ #
157
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
158
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
159
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
160
+ def create_project_location_global_hub(parent, hub_object = nil, hub_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
161
+ command = make_simple_command(:post, 'v1/{+parent}/hubs', options)
162
+ command.request_representation = Google::Apis::NetworkconnectivityV1::Hub::Representation
163
+ command.request_object = hub_object
164
+ command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation
165
+ command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation
166
+ command.params['parent'] = parent unless parent.nil?
167
+ command.query['hubId'] = hub_id unless hub_id.nil?
168
+ command.query['requestId'] = request_id unless request_id.nil?
169
+ command.query['fields'] = fields unless fields.nil?
170
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
171
+ execute_or_queue_command(command, &block)
172
+ end
173
+
174
+ # Deletes the specified hub.
175
+ # @param [String] name
176
+ # Required. The name of the hub to delete.
177
+ # @param [String] request_id
178
+ # Optional. A unique request ID (optional). If you specify this ID, you can use
179
+ # it in cases when you need to retry your request. When you need to retry, this
180
+ # ID lets the server know that it can ignore the request if it has already been
181
+ # completed. The server guarantees that for at least 60 minutes after the first
182
+ # request. For example, consider a situation where you make an initial request
183
+ # and the request times out. If you make the request again with the same request
184
+ # ID, the server can check to see whether the original operation was received.
185
+ # If it was, the server ignores the second request. This behavior prevents
186
+ # clients from mistakenly creating duplicate commitments. The request ID must be
187
+ # a valid UUID, with the exception that zero UUID is not supported (00000000-
188
+ # 0000-0000-0000-000000000000).
189
+ # @param [String] fields
190
+ # Selector specifying which fields to include in a partial response.
191
+ # @param [String] quota_user
192
+ # Available to use for quota purposes for server-side applications. Can be any
193
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
194
+ # @param [Google::Apis::RequestOptions] options
195
+ # Request-specific options
196
+ #
197
+ # @yield [result, err] Result & error if block supplied
198
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object
199
+ # @yieldparam err [StandardError] error object if request failed
200
+ #
201
+ # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation]
202
+ #
203
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
204
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
205
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
206
+ def delete_project_location_global_hub(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
207
+ command = make_simple_command(:delete, 'v1/{+name}', options)
208
+ command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation
209
+ command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation
210
+ command.params['name'] = name unless name.nil?
211
+ command.query['requestId'] = request_id unless request_id.nil?
212
+ command.query['fields'] = fields unless fields.nil?
213
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
214
+ execute_or_queue_command(command, &block)
215
+ end
216
+
217
+ # Gets details about the specified hub.
218
+ # @param [String] name
219
+ # Required. The name of the hub resource to get.
220
+ # @param [String] fields
221
+ # Selector specifying which fields to include in a partial response.
222
+ # @param [String] quota_user
223
+ # Available to use for quota purposes for server-side applications. Can be any
224
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
225
+ # @param [Google::Apis::RequestOptions] options
226
+ # Request-specific options
227
+ #
228
+ # @yield [result, err] Result & error if block supplied
229
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::Hub] parsed result object
230
+ # @yieldparam err [StandardError] error object if request failed
231
+ #
232
+ # @return [Google::Apis::NetworkconnectivityV1::Hub]
233
+ #
234
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
235
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
236
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
237
+ def get_project_location_global_hub(name, fields: nil, quota_user: nil, options: nil, &block)
238
+ command = make_simple_command(:get, 'v1/{+name}', options)
239
+ command.response_representation = Google::Apis::NetworkconnectivityV1::Hub::Representation
240
+ command.response_class = Google::Apis::NetworkconnectivityV1::Hub
241
+ command.params['name'] = name unless name.nil?
242
+ command.query['fields'] = fields unless fields.nil?
243
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
244
+ execute_or_queue_command(command, &block)
245
+ end
246
+
247
+ # Gets the access control policy for a resource. Returns an empty policy if the
248
+ # resource exists and does not have a policy set.
249
+ # @param [String] resource
250
+ # REQUIRED: The resource for which the policy is being requested. See the
251
+ # operation documentation for the appropriate value for this field.
252
+ # @param [Fixnum] options_requested_policy_version
253
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
254
+ # 3. Requests specifying an invalid value will be rejected. Requests for
255
+ # policies with any conditional bindings must specify version 3. Policies
256
+ # without any conditional bindings may specify any valid value or leave the
257
+ # field unset. To learn which resources support conditions in their IAM policies,
258
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
259
+ # resource-policies).
260
+ # @param [String] fields
261
+ # Selector specifying which fields to include in a partial response.
262
+ # @param [String] quota_user
263
+ # Available to use for quota purposes for server-side applications. Can be any
264
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
265
+ # @param [Google::Apis::RequestOptions] options
266
+ # Request-specific options
267
+ #
268
+ # @yield [result, err] Result & error if block supplied
269
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object
270
+ # @yieldparam err [StandardError] error object if request failed
271
+ #
272
+ # @return [Google::Apis::NetworkconnectivityV1::Policy]
273
+ #
274
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
275
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
276
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
277
+ def get_project_location_global_hub_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
278
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
279
+ command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation
280
+ command.response_class = Google::Apis::NetworkconnectivityV1::Policy
281
+ command.params['resource'] = resource unless resource.nil?
282
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
283
+ command.query['fields'] = fields unless fields.nil?
284
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
285
+ execute_or_queue_command(command, &block)
286
+ end
287
+
288
+ # Lists hubs in a given project.
289
+ # @param [String] parent
290
+ # Required. The parent resource's name.
291
+ # @param [String] filter
292
+ # An expression that filters the results listed in the response.
293
+ # @param [String] order_by
294
+ # Sort the results by a certain order.
295
+ # @param [Fixnum] page_size
296
+ # The maximum number of results per page that should be returned.
297
+ # @param [String] page_token
298
+ # The page token.
299
+ # @param [String] fields
300
+ # Selector specifying which fields to include in a partial response.
301
+ # @param [String] quota_user
302
+ # Available to use for quota purposes for server-side applications. Can be any
303
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
304
+ # @param [Google::Apis::RequestOptions] options
305
+ # Request-specific options
306
+ #
307
+ # @yield [result, err] Result & error if block supplied
308
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListHubsResponse] parsed result object
309
+ # @yieldparam err [StandardError] error object if request failed
310
+ #
311
+ # @return [Google::Apis::NetworkconnectivityV1::ListHubsResponse]
312
+ #
313
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
314
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
315
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
316
+ def list_project_location_global_hubs(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
317
+ command = make_simple_command(:get, 'v1/{+parent}/hubs', options)
318
+ command.response_representation = Google::Apis::NetworkconnectivityV1::ListHubsResponse::Representation
319
+ command.response_class = Google::Apis::NetworkconnectivityV1::ListHubsResponse
320
+ command.params['parent'] = parent unless parent.nil?
321
+ command.query['filter'] = filter unless filter.nil?
322
+ command.query['orderBy'] = order_by unless order_by.nil?
323
+ command.query['pageSize'] = page_size unless page_size.nil?
324
+ command.query['pageToken'] = page_token unless page_token.nil?
325
+ command.query['fields'] = fields unless fields.nil?
326
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
327
+ execute_or_queue_command(command, &block)
328
+ end
329
+
330
+ # Updates the description and/or labels of the specified hub.
331
+ # @param [String] name
332
+ # Immutable. The name of the hub. Hub names must be unique. They use the
333
+ # following form: `projects/`project_number`/locations/global/hubs/`hub_id``
334
+ # @param [Google::Apis::NetworkconnectivityV1::Hub] hub_object
335
+ # @param [String] request_id
336
+ # Optional. A unique request ID (optional). If you specify this ID, you can use
337
+ # it in cases when you need to retry your request. When you need to retry, this
338
+ # ID lets the server know that it can ignore the request if it has already been
339
+ # completed. The server guarantees that for at least 60 minutes after the first
340
+ # request. For example, consider a situation where you make an initial request
341
+ # and the request times out. If you make the request again with the same request
342
+ # ID, the server can check to see whether the original operation was received.
343
+ # If it was, the server ignores the second request. This behavior prevents
344
+ # clients from mistakenly creating duplicate commitments. The request ID must be
345
+ # a valid UUID, with the exception that zero UUID is not supported (00000000-
346
+ # 0000-0000-0000-000000000000).
347
+ # @param [String] update_mask
348
+ # Optional. In the case of an update to an existing hub, field mask is used to
349
+ # specify the fields to be overwritten. The fields specified in the update_mask
350
+ # are relative to the resource, not the full request. A field is overwritten if
351
+ # it is in the mask. If the user does not provide a mask, then all fields are
352
+ # overwritten.
353
+ # @param [String] fields
354
+ # Selector specifying which fields to include in a partial response.
355
+ # @param [String] quota_user
356
+ # Available to use for quota purposes for server-side applications. Can be any
357
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
358
+ # @param [Google::Apis::RequestOptions] options
359
+ # Request-specific options
360
+ #
361
+ # @yield [result, err] Result & error if block supplied
362
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object
363
+ # @yieldparam err [StandardError] error object if request failed
364
+ #
365
+ # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation]
366
+ #
367
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
368
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
369
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
370
+ def patch_project_location_global_hub(name, hub_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
371
+ command = make_simple_command(:patch, 'v1/{+name}', options)
372
+ command.request_representation = Google::Apis::NetworkconnectivityV1::Hub::Representation
373
+ command.request_object = hub_object
374
+ command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation
375
+ command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation
376
+ command.params['name'] = name unless name.nil?
377
+ command.query['requestId'] = request_id unless request_id.nil?
378
+ command.query['updateMask'] = update_mask unless update_mask.nil?
379
+ command.query['fields'] = fields unless fields.nil?
380
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
381
+ execute_or_queue_command(command, &block)
382
+ end
383
+
384
+ # Sets the access control policy on the specified resource. Replaces any
385
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
386
+ # PERMISSION_DENIED` errors.
387
+ # @param [String] resource
388
+ # REQUIRED: The resource for which the policy is being specified. See the
389
+ # operation documentation for the appropriate value for this field.
390
+ # @param [Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest] set_iam_policy_request_object
391
+ # @param [String] fields
392
+ # Selector specifying which fields to include in a partial response.
393
+ # @param [String] quota_user
394
+ # Available to use for quota purposes for server-side applications. Can be any
395
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
396
+ # @param [Google::Apis::RequestOptions] options
397
+ # Request-specific options
398
+ #
399
+ # @yield [result, err] Result & error if block supplied
400
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object
401
+ # @yieldparam err [StandardError] error object if request failed
402
+ #
403
+ # @return [Google::Apis::NetworkconnectivityV1::Policy]
404
+ #
405
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
406
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
407
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
408
+ def set_hub_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
409
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
410
+ command.request_representation = Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest::Representation
411
+ command.request_object = set_iam_policy_request_object
412
+ command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation
413
+ command.response_class = Google::Apis::NetworkconnectivityV1::Policy
414
+ command.params['resource'] = resource unless resource.nil?
415
+ command.query['fields'] = fields unless fields.nil?
416
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
417
+ execute_or_queue_command(command, &block)
418
+ end
419
+
420
+ # Returns permissions that a caller has on the specified resource. If the
421
+ # resource does not exist, this will return an empty set of permissions, not a `
422
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
423
+ # permission-aware UIs and command-line tools, not for authorization checking.
424
+ # This operation may "fail open" without warning.
425
+ # @param [String] resource
426
+ # REQUIRED: The resource for which the policy detail is being requested. See the
427
+ # operation documentation for the appropriate value for this field.
428
+ # @param [Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest] test_iam_permissions_request_object
429
+ # @param [String] fields
430
+ # Selector specifying which fields to include in a partial response.
431
+ # @param [String] quota_user
432
+ # Available to use for quota purposes for server-side applications. Can be any
433
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
434
+ # @param [Google::Apis::RequestOptions] options
435
+ # Request-specific options
436
+ #
437
+ # @yield [result, err] Result & error if block supplied
438
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] parsed result object
439
+ # @yieldparam err [StandardError] error object if request failed
440
+ #
441
+ # @return [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse]
442
+ #
443
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
444
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
445
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
446
+ def test_hub_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
447
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
448
+ command.request_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest::Representation
449
+ command.request_object = test_iam_permissions_request_object
450
+ command.response_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse::Representation
451
+ command.response_class = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse
452
+ command.params['resource'] = resource unless resource.nil?
453
+ command.query['fields'] = fields unless fields.nil?
454
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
455
+ execute_or_queue_command(command, &block)
456
+ end
457
+
458
+ # Gets the access control policy for a resource. Returns an empty policy if the
459
+ # resource exists and does not have a policy set.
460
+ # @param [String] resource
461
+ # REQUIRED: The resource for which the policy is being requested. See the
462
+ # operation documentation for the appropriate value for this field.
463
+ # @param [Fixnum] options_requested_policy_version
464
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
465
+ # 3. Requests specifying an invalid value will be rejected. Requests for
466
+ # policies with any conditional bindings must specify version 3. Policies
467
+ # without any conditional bindings may specify any valid value or leave the
468
+ # field unset. To learn which resources support conditions in their IAM policies,
469
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
470
+ # resource-policies).
471
+ # @param [String] fields
472
+ # Selector specifying which fields to include in a partial response.
473
+ # @param [String] quota_user
474
+ # Available to use for quota purposes for server-side applications. Can be any
475
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
476
+ # @param [Google::Apis::RequestOptions] options
477
+ # Request-specific options
478
+ #
479
+ # @yield [result, err] Result & error if block supplied
480
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object
481
+ # @yieldparam err [StandardError] error object if request failed
482
+ #
483
+ # @return [Google::Apis::NetworkconnectivityV1::Policy]
484
+ #
485
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
486
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
487
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
488
+ def get_project_location_global_policy_based_route_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
489
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
490
+ command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation
491
+ command.response_class = Google::Apis::NetworkconnectivityV1::Policy
492
+ command.params['resource'] = resource unless resource.nil?
493
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
494
+ command.query['fields'] = fields unless fields.nil?
495
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
496
+ execute_or_queue_command(command, &block)
497
+ end
498
+
499
+ # Sets the access control policy on the specified resource. Replaces any
500
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
501
+ # PERMISSION_DENIED` errors.
502
+ # @param [String] resource
503
+ # REQUIRED: The resource for which the policy is being specified. See the
504
+ # operation documentation for the appropriate value for this field.
505
+ # @param [Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest] set_iam_policy_request_object
506
+ # @param [String] fields
507
+ # Selector specifying which fields to include in a partial response.
508
+ # @param [String] quota_user
509
+ # Available to use for quota purposes for server-side applications. Can be any
510
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
511
+ # @param [Google::Apis::RequestOptions] options
512
+ # Request-specific options
513
+ #
514
+ # @yield [result, err] Result & error if block supplied
515
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object
516
+ # @yieldparam err [StandardError] error object if request failed
517
+ #
518
+ # @return [Google::Apis::NetworkconnectivityV1::Policy]
519
+ #
520
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
521
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
522
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
523
+ def set_policy_based_route_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
524
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
525
+ command.request_representation = Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest::Representation
526
+ command.request_object = set_iam_policy_request_object
527
+ command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation
528
+ command.response_class = Google::Apis::NetworkconnectivityV1::Policy
529
+ command.params['resource'] = resource unless resource.nil?
530
+ command.query['fields'] = fields unless fields.nil?
531
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
532
+ execute_or_queue_command(command, &block)
533
+ end
534
+
535
+ # Returns permissions that a caller has on the specified resource. If the
536
+ # resource does not exist, this will return an empty set of permissions, not a `
537
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
538
+ # permission-aware UIs and command-line tools, not for authorization checking.
539
+ # This operation may "fail open" without warning.
540
+ # @param [String] resource
541
+ # REQUIRED: The resource for which the policy detail is being requested. See the
542
+ # operation documentation for the appropriate value for this field.
543
+ # @param [Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest] test_iam_permissions_request_object
544
+ # @param [String] fields
545
+ # Selector specifying which fields to include in a partial response.
546
+ # @param [String] quota_user
547
+ # Available to use for quota purposes for server-side applications. Can be any
548
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
549
+ # @param [Google::Apis::RequestOptions] options
550
+ # Request-specific options
551
+ #
552
+ # @yield [result, err] Result & error if block supplied
553
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] parsed result object
554
+ # @yieldparam err [StandardError] error object if request failed
555
+ #
556
+ # @return [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse]
557
+ #
558
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
559
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
560
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
561
+ def test_policy_based_route_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
562
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
563
+ command.request_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest::Representation
564
+ command.request_object = test_iam_permissions_request_object
565
+ command.response_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse::Representation
566
+ command.response_class = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse
567
+ command.params['resource'] = resource unless resource.nil?
568
+ command.query['fields'] = fields unless fields.nil?
569
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
570
+ execute_or_queue_command(command, &block)
571
+ end
572
+
573
+ # Starts asynchronous cancellation on a long-running operation. The server makes
574
+ # a best effort to cancel the operation, but success is not guaranteed. If the
575
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
576
+ # Clients can use Operations.GetOperation or other methods to check whether the
577
+ # cancellation succeeded or whether the operation completed despite cancellation.
578
+ # On successful cancellation, the operation is not deleted; instead, it becomes
579
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
580
+ # corresponding to `Code.CANCELLED`.
581
+ # @param [String] name
582
+ # The name of the operation resource to be cancelled.
583
+ # @param [Google::Apis::NetworkconnectivityV1::GoogleLongrunningCancelOperationRequest] google_longrunning_cancel_operation_request_object
584
+ # @param [String] fields
585
+ # Selector specifying which fields to include in a partial response.
586
+ # @param [String] quota_user
587
+ # Available to use for quota purposes for server-side applications. Can be any
588
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
589
+ # @param [Google::Apis::RequestOptions] options
590
+ # Request-specific options
591
+ #
592
+ # @yield [result, err] Result & error if block supplied
593
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::Empty] parsed result object
594
+ # @yieldparam err [StandardError] error object if request failed
595
+ #
596
+ # @return [Google::Apis::NetworkconnectivityV1::Empty]
597
+ #
598
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
599
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
600
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
601
+ def cancel_project_location_operation(name, google_longrunning_cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
602
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
603
+ command.request_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningCancelOperationRequest::Representation
604
+ command.request_object = google_longrunning_cancel_operation_request_object
605
+ command.response_representation = Google::Apis::NetworkconnectivityV1::Empty::Representation
606
+ command.response_class = Google::Apis::NetworkconnectivityV1::Empty
607
+ command.params['name'] = name unless name.nil?
608
+ command.query['fields'] = fields unless fields.nil?
609
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
610
+ execute_or_queue_command(command, &block)
611
+ end
612
+
613
+ # Deletes a long-running operation. This method indicates that the client is no
614
+ # longer interested in the operation result. It does not cancel the operation.
615
+ # If the server doesn't support this method, it returns `google.rpc.Code.
616
+ # UNIMPLEMENTED`.
617
+ # @param [String] name
618
+ # The name of the operation resource to be deleted.
619
+ # @param [String] fields
620
+ # Selector specifying which fields to include in a partial response.
621
+ # @param [String] quota_user
622
+ # Available to use for quota purposes for server-side applications. Can be any
623
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
624
+ # @param [Google::Apis::RequestOptions] options
625
+ # Request-specific options
626
+ #
627
+ # @yield [result, err] Result & error if block supplied
628
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::Empty] parsed result object
629
+ # @yieldparam err [StandardError] error object if request failed
630
+ #
631
+ # @return [Google::Apis::NetworkconnectivityV1::Empty]
632
+ #
633
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
634
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
635
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
636
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
637
+ command = make_simple_command(:delete, 'v1/{+name}', options)
638
+ command.response_representation = Google::Apis::NetworkconnectivityV1::Empty::Representation
639
+ command.response_class = Google::Apis::NetworkconnectivityV1::Empty
640
+ command.params['name'] = name unless name.nil?
641
+ command.query['fields'] = fields unless fields.nil?
642
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
643
+ execute_or_queue_command(command, &block)
644
+ end
645
+
646
+ # Gets the latest state of a long-running operation. Clients can use this method
647
+ # to poll the operation result at intervals as recommended by the API service.
648
+ # @param [String] name
649
+ # The name of the operation resource.
650
+ # @param [String] fields
651
+ # Selector specifying which fields to include in a partial response.
652
+ # @param [String] quota_user
653
+ # Available to use for quota purposes for server-side applications. Can be any
654
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
655
+ # @param [Google::Apis::RequestOptions] options
656
+ # Request-specific options
657
+ #
658
+ # @yield [result, err] Result & error if block supplied
659
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object
660
+ # @yieldparam err [StandardError] error object if request failed
661
+ #
662
+ # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation]
663
+ #
664
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
665
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
666
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
667
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
668
+ command = make_simple_command(:get, 'v1/{+name}', options)
669
+ command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation
670
+ command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation
671
+ command.params['name'] = name unless name.nil?
672
+ command.query['fields'] = fields unless fields.nil?
673
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
674
+ execute_or_queue_command(command, &block)
675
+ end
676
+
677
+ # Lists operations that match the specified filter in the request. If the server
678
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
679
+ # binding allows API services to override the binding to use different resource
680
+ # name schemes, such as `users/*/operations`. To override the binding, API
681
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
682
+ # service configuration. For backwards compatibility, the default name includes
683
+ # the operations collection id, however overriding users must ensure the name
684
+ # binding is the parent resource, without the operations collection id.
685
+ # @param [String] name
686
+ # The name of the operation's parent resource.
687
+ # @param [String] filter
688
+ # The standard list filter.
689
+ # @param [Fixnum] page_size
690
+ # The standard list page size.
691
+ # @param [String] page_token
692
+ # The standard list page token.
693
+ # @param [String] fields
694
+ # Selector specifying which fields to include in a partial response.
695
+ # @param [String] quota_user
696
+ # Available to use for quota purposes for server-side applications. Can be any
697
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
698
+ # @param [Google::Apis::RequestOptions] options
699
+ # Request-specific options
700
+ #
701
+ # @yield [result, err] Result & error if block supplied
702
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningListOperationsResponse] parsed result object
703
+ # @yieldparam err [StandardError] error object if request failed
704
+ #
705
+ # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningListOperationsResponse]
706
+ #
707
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
708
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
709
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
710
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
711
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
712
+ command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningListOperationsResponse::Representation
713
+ command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningListOperationsResponse
714
+ command.params['name'] = name unless name.nil?
715
+ command.query['filter'] = filter unless filter.nil?
716
+ command.query['pageSize'] = page_size unless page_size.nil?
717
+ command.query['pageToken'] = page_token unless page_token.nil?
718
+ command.query['fields'] = fields unless fields.nil?
719
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
720
+ execute_or_queue_command(command, &block)
721
+ end
722
+
723
+ # Creates a spoke in the specified project and location.
724
+ # @param [String] parent
725
+ # Required. The parent resource.
726
+ # @param [Google::Apis::NetworkconnectivityV1::Spoke] spoke_object
727
+ # @param [String] request_id
728
+ # Optional. A unique request ID (optional). If you specify this ID, you can use
729
+ # it in cases when you need to retry your request. When you need to retry, this
730
+ # ID lets the server know that it can ignore the request if it has already been
731
+ # completed. The server guarantees that for at least 60 minutes after the first
732
+ # request. For example, consider a situation where you make an initial request
733
+ # and the request times out. If you make the request again with the same request
734
+ # ID, the server can check to see whether the original operation was received.
735
+ # If it was, the server ignores the second request. This behavior prevents
736
+ # clients from mistakenly creating duplicate commitments. The request ID must be
737
+ # a valid UUID, with the exception that zero UUID is not supported (00000000-
738
+ # 0000-0000-0000-000000000000).
739
+ # @param [String] spoke_id
740
+ # Optional. Unique id for the spoke to create.
741
+ # @param [String] fields
742
+ # Selector specifying which fields to include in a partial response.
743
+ # @param [String] quota_user
744
+ # Available to use for quota purposes for server-side applications. Can be any
745
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
746
+ # @param [Google::Apis::RequestOptions] options
747
+ # Request-specific options
748
+ #
749
+ # @yield [result, err] Result & error if block supplied
750
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object
751
+ # @yieldparam err [StandardError] error object if request failed
752
+ #
753
+ # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation]
754
+ #
755
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
756
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
757
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
758
+ def create_project_location_spoke(parent, spoke_object = nil, request_id: nil, spoke_id: nil, fields: nil, quota_user: nil, options: nil, &block)
759
+ command = make_simple_command(:post, 'v1/{+parent}/spokes', options)
760
+ command.request_representation = Google::Apis::NetworkconnectivityV1::Spoke::Representation
761
+ command.request_object = spoke_object
762
+ command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation
763
+ command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation
764
+ command.params['parent'] = parent unless parent.nil?
765
+ command.query['requestId'] = request_id unless request_id.nil?
766
+ command.query['spokeId'] = spoke_id unless spoke_id.nil?
767
+ command.query['fields'] = fields unless fields.nil?
768
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
769
+ execute_or_queue_command(command, &block)
770
+ end
771
+
772
+ # Deletes the specified spoke.
773
+ # @param [String] name
774
+ # Required. The name of the spoke to delete.
775
+ # @param [String] request_id
776
+ # Optional. A unique request ID (optional). If you specify this ID, you can use
777
+ # it in cases when you need to retry your request. When you need to retry, this
778
+ # ID lets the server know that it can ignore the request if it has already been
779
+ # completed. The server guarantees that for at least 60 minutes after the first
780
+ # request. For example, consider a situation where you make an initial request
781
+ # and the request times out. If you make the request again with the same request
782
+ # ID, the server can check to see whether the original operation was received.
783
+ # If it was, the server ignores the second request. This behavior prevents
784
+ # clients from mistakenly creating duplicate commitments. The request ID must be
785
+ # a valid UUID, with the exception that zero UUID is not supported (00000000-
786
+ # 0000-0000-0000-000000000000).
787
+ # @param [String] fields
788
+ # Selector specifying which fields to include in a partial response.
789
+ # @param [String] quota_user
790
+ # Available to use for quota purposes for server-side applications. Can be any
791
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
792
+ # @param [Google::Apis::RequestOptions] options
793
+ # Request-specific options
794
+ #
795
+ # @yield [result, err] Result & error if block supplied
796
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object
797
+ # @yieldparam err [StandardError] error object if request failed
798
+ #
799
+ # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation]
800
+ #
801
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
802
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
803
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
804
+ def delete_project_location_spoke(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
805
+ command = make_simple_command(:delete, 'v1/{+name}', options)
806
+ command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation
807
+ command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation
808
+ command.params['name'] = name unless name.nil?
809
+ command.query['requestId'] = request_id unless request_id.nil?
810
+ command.query['fields'] = fields unless fields.nil?
811
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
812
+ execute_or_queue_command(command, &block)
813
+ end
814
+
815
+ # Gets details about the specified spoke.
816
+ # @param [String] name
817
+ # Required. The name of the spoke resource.
818
+ # @param [String] fields
819
+ # Selector specifying which fields to include in a partial response.
820
+ # @param [String] quota_user
821
+ # Available to use for quota purposes for server-side applications. Can be any
822
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
823
+ # @param [Google::Apis::RequestOptions] options
824
+ # Request-specific options
825
+ #
826
+ # @yield [result, err] Result & error if block supplied
827
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::Spoke] parsed result object
828
+ # @yieldparam err [StandardError] error object if request failed
829
+ #
830
+ # @return [Google::Apis::NetworkconnectivityV1::Spoke]
831
+ #
832
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
833
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
834
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
835
+ def get_project_location_spoke(name, fields: nil, quota_user: nil, options: nil, &block)
836
+ command = make_simple_command(:get, 'v1/{+name}', options)
837
+ command.response_representation = Google::Apis::NetworkconnectivityV1::Spoke::Representation
838
+ command.response_class = Google::Apis::NetworkconnectivityV1::Spoke
839
+ command.params['name'] = name unless name.nil?
840
+ command.query['fields'] = fields unless fields.nil?
841
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
842
+ execute_or_queue_command(command, &block)
843
+ end
844
+
845
+ # Gets the access control policy for a resource. Returns an empty policy if the
846
+ # resource exists and does not have a policy set.
847
+ # @param [String] resource
848
+ # REQUIRED: The resource for which the policy is being requested. See the
849
+ # operation documentation for the appropriate value for this field.
850
+ # @param [Fixnum] options_requested_policy_version
851
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
852
+ # 3. Requests specifying an invalid value will be rejected. Requests for
853
+ # policies with any conditional bindings must specify version 3. Policies
854
+ # without any conditional bindings may specify any valid value or leave the
855
+ # field unset. To learn which resources support conditions in their IAM policies,
856
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
857
+ # resource-policies).
858
+ # @param [String] fields
859
+ # Selector specifying which fields to include in a partial response.
860
+ # @param [String] quota_user
861
+ # Available to use for quota purposes for server-side applications. Can be any
862
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
863
+ # @param [Google::Apis::RequestOptions] options
864
+ # Request-specific options
865
+ #
866
+ # @yield [result, err] Result & error if block supplied
867
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object
868
+ # @yieldparam err [StandardError] error object if request failed
869
+ #
870
+ # @return [Google::Apis::NetworkconnectivityV1::Policy]
871
+ #
872
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
873
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
874
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
875
+ def get_project_location_spoke_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
876
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
877
+ command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation
878
+ command.response_class = Google::Apis::NetworkconnectivityV1::Policy
879
+ command.params['resource'] = resource unless resource.nil?
880
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
881
+ command.query['fields'] = fields unless fields.nil?
882
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
883
+ execute_or_queue_command(command, &block)
884
+ end
885
+
886
+ # Lists the spokes in the specified project and location.
887
+ # @param [String] parent
888
+ # Required. The parent resource.
889
+ # @param [String] filter
890
+ # An expression that filters the results listed in the response.
891
+ # @param [String] order_by
892
+ # Sort the results by a certain order.
893
+ # @param [Fixnum] page_size
894
+ # The maximum number of results per page that should be returned.
895
+ # @param [String] page_token
896
+ # The page token.
897
+ # @param [String] fields
898
+ # Selector specifying which fields to include in a partial response.
899
+ # @param [String] quota_user
900
+ # Available to use for quota purposes for server-side applications. Can be any
901
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
902
+ # @param [Google::Apis::RequestOptions] options
903
+ # Request-specific options
904
+ #
905
+ # @yield [result, err] Result & error if block supplied
906
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::ListSpokesResponse] parsed result object
907
+ # @yieldparam err [StandardError] error object if request failed
908
+ #
909
+ # @return [Google::Apis::NetworkconnectivityV1::ListSpokesResponse]
910
+ #
911
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
912
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
913
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
914
+ def list_project_location_spokes(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
915
+ command = make_simple_command(:get, 'v1/{+parent}/spokes', options)
916
+ command.response_representation = Google::Apis::NetworkconnectivityV1::ListSpokesResponse::Representation
917
+ command.response_class = Google::Apis::NetworkconnectivityV1::ListSpokesResponse
918
+ command.params['parent'] = parent unless parent.nil?
919
+ command.query['filter'] = filter unless filter.nil?
920
+ command.query['orderBy'] = order_by unless order_by.nil?
921
+ command.query['pageSize'] = page_size unless page_size.nil?
922
+ command.query['pageToken'] = page_token unless page_token.nil?
923
+ command.query['fields'] = fields unless fields.nil?
924
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
925
+ execute_or_queue_command(command, &block)
926
+ end
927
+
928
+ # Updates the parameters of the specified spoke.
929
+ # @param [String] name
930
+ # Immutable. The name of the spoke. Spoke names must be unique. They use the
931
+ # following form: `projects/`project_number`/locations/`region`/spokes/`spoke_id`
932
+ # `
933
+ # @param [Google::Apis::NetworkconnectivityV1::Spoke] spoke_object
934
+ # @param [String] request_id
935
+ # Optional. A unique request ID (optional). If you specify this ID, you can use
936
+ # it in cases when you need to retry your request. When you need to retry, this
937
+ # ID lets the server know that it can ignore the request if it has already been
938
+ # completed. The server guarantees that for at least 60 minutes after the first
939
+ # request. For example, consider a situation where you make an initial request
940
+ # and the request times out. If you make the request again with the same request
941
+ # ID, the server can check to see whether the original operation was received.
942
+ # If it was, the server ignores the second request. This behavior prevents
943
+ # clients from mistakenly creating duplicate commitments. The request ID must be
944
+ # a valid UUID, with the exception that zero UUID is not supported (00000000-
945
+ # 0000-0000-0000-000000000000).
946
+ # @param [String] update_mask
947
+ # Optional. In the case of an update to an existing spoke, field mask is used to
948
+ # specify the fields to be overwritten. The fields specified in the update_mask
949
+ # are relative to the resource, not the full request. A field is overwritten if
950
+ # it is in the mask. If the user does not provide a mask, then all fields are
951
+ # overwritten.
952
+ # @param [String] fields
953
+ # Selector specifying which fields to include in a partial response.
954
+ # @param [String] quota_user
955
+ # Available to use for quota purposes for server-side applications. Can be any
956
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
957
+ # @param [Google::Apis::RequestOptions] options
958
+ # Request-specific options
959
+ #
960
+ # @yield [result, err] Result & error if block supplied
961
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object
962
+ # @yieldparam err [StandardError] error object if request failed
963
+ #
964
+ # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation]
965
+ #
966
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
967
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
968
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
969
+ def patch_project_location_spoke(name, spoke_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
970
+ command = make_simple_command(:patch, 'v1/{+name}', options)
971
+ command.request_representation = Google::Apis::NetworkconnectivityV1::Spoke::Representation
972
+ command.request_object = spoke_object
973
+ command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation
974
+ command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation
975
+ command.params['name'] = name unless name.nil?
976
+ command.query['requestId'] = request_id unless request_id.nil?
977
+ command.query['updateMask'] = update_mask unless update_mask.nil?
978
+ command.query['fields'] = fields unless fields.nil?
979
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
980
+ execute_or_queue_command(command, &block)
981
+ end
982
+
983
+ # Sets the access control policy on the specified resource. Replaces any
984
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
985
+ # PERMISSION_DENIED` errors.
986
+ # @param [String] resource
987
+ # REQUIRED: The resource for which the policy is being specified. See the
988
+ # operation documentation for the appropriate value for this field.
989
+ # @param [Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest] set_iam_policy_request_object
990
+ # @param [String] fields
991
+ # Selector specifying which fields to include in a partial response.
992
+ # @param [String] quota_user
993
+ # Available to use for quota purposes for server-side applications. Can be any
994
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
995
+ # @param [Google::Apis::RequestOptions] options
996
+ # Request-specific options
997
+ #
998
+ # @yield [result, err] Result & error if block supplied
999
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::Policy] parsed result object
1000
+ # @yieldparam err [StandardError] error object if request failed
1001
+ #
1002
+ # @return [Google::Apis::NetworkconnectivityV1::Policy]
1003
+ #
1004
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1005
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1006
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1007
+ def set_spoke_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1008
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
1009
+ command.request_representation = Google::Apis::NetworkconnectivityV1::SetIamPolicyRequest::Representation
1010
+ command.request_object = set_iam_policy_request_object
1011
+ command.response_representation = Google::Apis::NetworkconnectivityV1::Policy::Representation
1012
+ command.response_class = Google::Apis::NetworkconnectivityV1::Policy
1013
+ command.params['resource'] = resource unless resource.nil?
1014
+ command.query['fields'] = fields unless fields.nil?
1015
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1016
+ execute_or_queue_command(command, &block)
1017
+ end
1018
+
1019
+ # Returns permissions that a caller has on the specified resource. If the
1020
+ # resource does not exist, this will return an empty set of permissions, not a `
1021
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
1022
+ # permission-aware UIs and command-line tools, not for authorization checking.
1023
+ # This operation may "fail open" without warning.
1024
+ # @param [String] resource
1025
+ # REQUIRED: The resource for which the policy detail is being requested. See the
1026
+ # operation documentation for the appropriate value for this field.
1027
+ # @param [Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest] test_iam_permissions_request_object
1028
+ # @param [String] fields
1029
+ # Selector specifying which fields to include in a partial response.
1030
+ # @param [String] quota_user
1031
+ # Available to use for quota purposes for server-side applications. Can be any
1032
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1033
+ # @param [Google::Apis::RequestOptions] options
1034
+ # Request-specific options
1035
+ #
1036
+ # @yield [result, err] Result & error if block supplied
1037
+ # @yieldparam result [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse] parsed result object
1038
+ # @yieldparam err [StandardError] error object if request failed
1039
+ #
1040
+ # @return [Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse]
1041
+ #
1042
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1043
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1044
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1045
+ def test_spoke_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1046
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
1047
+ command.request_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsRequest::Representation
1048
+ command.request_object = test_iam_permissions_request_object
1049
+ command.response_representation = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse::Representation
1050
+ command.response_class = Google::Apis::NetworkconnectivityV1::TestIamPermissionsResponse
1051
+ command.params['resource'] = resource unless resource.nil?
1052
+ command.query['fields'] = fields unless fields.nil?
1053
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1054
+ execute_or_queue_command(command, &block)
1055
+ end
1056
+
1057
+ protected
1058
+
1059
+ def apply_command_defaults(command)
1060
+ command.query['key'] = key unless key.nil?
1061
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1062
+ end
1063
+ end
1064
+ end
1065
+ end
1066
+ end