google-apis-networkconnectivity_v1alpha1 0.1.0

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