google-cloud-iap-v1 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1043 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/iap/v1/service_pb"
21
+ require "google/cloud/iap/v1/identity_aware_proxy_admin_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Iap
26
+ module V1
27
+ module IdentityAwareProxyAdminService
28
+ module Rest
29
+ ##
30
+ # REST client for the IdentityAwareProxyAdminService service.
31
+ #
32
+ # APIs for Identity-Aware Proxy Admin configurations.
33
+ #
34
+ class Client
35
+ include Paths
36
+
37
+ # @private
38
+ attr_reader :identity_aware_proxy_admin_service_stub
39
+
40
+ ##
41
+ # Configure the IdentityAwareProxyAdminService Client class.
42
+ #
43
+ # See {::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::Client::Configuration}
44
+ # for a description of the configuration fields.
45
+ #
46
+ # @example
47
+ #
48
+ # # Modify the configuration for all IdentityAwareProxyAdminService clients
49
+ # ::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
52
+ #
53
+ # @yield [config] Configure the Client client.
54
+ # @yieldparam config [Client::Configuration]
55
+ #
56
+ # @return [Client::Configuration]
57
+ #
58
+ def self.configure
59
+ @configure ||= begin
60
+ namespace = ["Google", "Cloud", "Iap", "V1"]
61
+ parent_config = while namespace.any?
62
+ parent_name = namespace.join "::"
63
+ parent_const = const_get parent_name
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
+ namespace.pop
66
+ end
67
+ default_config = Client::Configuration.new parent_config
68
+
69
+ default_config.timeout = 60.0
70
+
71
+ default_config
72
+ end
73
+ yield @configure if block_given?
74
+ @configure
75
+ end
76
+
77
+ ##
78
+ # Configure the IdentityAwareProxyAdminService Client instance.
79
+ #
80
+ # The configuration is set to the derived mode, meaning that values can be changed,
81
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
82
+ # should be made on {Client.configure}.
83
+ #
84
+ # See {::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::Client::Configuration}
85
+ # for a description of the configuration fields.
86
+ #
87
+ # @yield [config] Configure the Client client.
88
+ # @yieldparam config [Client::Configuration]
89
+ #
90
+ # @return [Client::Configuration]
91
+ #
92
+ def configure
93
+ yield @config if block_given?
94
+ @config
95
+ end
96
+
97
+ ##
98
+ # Create a new IdentityAwareProxyAdminService REST client object.
99
+ #
100
+ # @example
101
+ #
102
+ # # Create a client using the default configuration
103
+ # client = ::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::Client.new
104
+ #
105
+ # # Create a client using a custom configuration
106
+ # client = ::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::Client.new do |config|
107
+ # config.timeout = 10.0
108
+ # end
109
+ #
110
+ # @yield [config] Configure the IdentityAwareProxyAdminService client.
111
+ # @yieldparam config [Client::Configuration]
112
+ #
113
+ def initialize
114
+ # Create the configuration object
115
+ @config = Configuration.new Client.configure
116
+
117
+ # Yield the configuration if needed
118
+ yield @config if block_given?
119
+
120
+ # Create credentials
121
+ credentials = @config.credentials
122
+ # Use self-signed JWT if the endpoint is unchanged from default,
123
+ # but only if the default endpoint does not have a region prefix.
124
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
125
+ !@config.endpoint.split(".").first.include?("-")
126
+ credentials ||= Credentials.default scope: @config.scope,
127
+ enable_self_signed_jwt: enable_self_signed_jwt
128
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
129
+ credentials = Credentials.new credentials, scope: @config.scope
130
+ end
131
+
132
+ @quota_project_id = @config.quota_project
133
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
134
+
135
+ @identity_aware_proxy_admin_service_stub = ::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
136
+ end
137
+
138
+ # Service calls
139
+
140
+ ##
141
+ # Sets the access control policy for an Identity-Aware Proxy protected
142
+ # resource. Replaces any existing policy.
143
+ # More information about managing access via IAP can be found at:
144
+ # https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
145
+ #
146
+ # @overload set_iam_policy(request, options = nil)
147
+ # Pass arguments to `set_iam_policy` via a request object, either of type
148
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
149
+ #
150
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
151
+ # A request object representing the call parameters. Required. To specify no
152
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
153
+ # @param options [::Gapic::CallOptions, ::Hash]
154
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
155
+ #
156
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
157
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
158
+ # least one keyword argument is required. To specify no parameters, or to keep all
159
+ # the default parameter values, pass an empty Hash as a request object (see above).
160
+ #
161
+ # @param resource [::String]
162
+ # REQUIRED: The resource for which the policy is being specified.
163
+ # See the operation documentation for the appropriate value for this field.
164
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
165
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
166
+ # the policy is limited to a few 10s of KB. An empty policy is a
167
+ # valid policy but certain Cloud Platform services (such as Projects)
168
+ # might reject them.
169
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
170
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
171
+ # the fields in the mask will be modified. If no mask is provided, the
172
+ # following default mask is used:
173
+ #
174
+ # `paths: "bindings, etag"`
175
+ # @yield [result, operation] Access the result along with the TransportOperation object
176
+ # @yieldparam result [::Google::Iam::V1::Policy]
177
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
178
+ #
179
+ # @return [::Google::Iam::V1::Policy]
180
+ #
181
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
182
+ def set_iam_policy request, options = nil
183
+ raise ::ArgumentError, "request must be provided" if request.nil?
184
+
185
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
186
+
187
+ # Converts hash and nil to an options object
188
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
189
+
190
+ # Customize the options with defaults
191
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
192
+
193
+ # Set x-goog-api-client and x-goog-user-project headers
194
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
195
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
196
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
197
+ transports_version_send: [:rest]
198
+
199
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
200
+
201
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
202
+ metadata: call_metadata,
203
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
204
+
205
+ options.apply_defaults timeout: @config.timeout,
206
+ metadata: @config.metadata,
207
+ retry_policy: @config.retry_policy
208
+
209
+ @identity_aware_proxy_admin_service_stub.set_iam_policy request, options do |result, operation|
210
+ yield result, operation if block_given?
211
+ return result
212
+ end
213
+ rescue ::Gapic::Rest::Error => e
214
+ raise ::Google::Cloud::Error.from_error(e)
215
+ end
216
+
217
+ ##
218
+ # Gets the access control policy for an Identity-Aware Proxy protected
219
+ # resource.
220
+ # More information about managing access via IAP can be found at:
221
+ # https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
222
+ #
223
+ # @overload get_iam_policy(request, options = nil)
224
+ # Pass arguments to `get_iam_policy` via a request object, either of type
225
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
226
+ #
227
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
228
+ # A request object representing the call parameters. Required. To specify no
229
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
230
+ # @param options [::Gapic::CallOptions, ::Hash]
231
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
232
+ #
233
+ # @overload get_iam_policy(resource: nil, options: nil)
234
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
235
+ # least one keyword argument is required. To specify no parameters, or to keep all
236
+ # the default parameter values, pass an empty Hash as a request object (see above).
237
+ #
238
+ # @param resource [::String]
239
+ # REQUIRED: The resource for which the policy is being requested.
240
+ # See the operation documentation for the appropriate value for this field.
241
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
242
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
243
+ # `GetIamPolicy`.
244
+ # @yield [result, operation] Access the result along with the TransportOperation object
245
+ # @yieldparam result [::Google::Iam::V1::Policy]
246
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
247
+ #
248
+ # @return [::Google::Iam::V1::Policy]
249
+ #
250
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
251
+ def get_iam_policy request, options = nil
252
+ raise ::ArgumentError, "request must be provided" if request.nil?
253
+
254
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
255
+
256
+ # Converts hash and nil to an options object
257
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
258
+
259
+ # Customize the options with defaults
260
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
261
+
262
+ # Set x-goog-api-client and x-goog-user-project headers
263
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
264
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
265
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
266
+ transports_version_send: [:rest]
267
+
268
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
269
+
270
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
271
+ metadata: call_metadata,
272
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
273
+
274
+ options.apply_defaults timeout: @config.timeout,
275
+ metadata: @config.metadata,
276
+ retry_policy: @config.retry_policy
277
+
278
+ @identity_aware_proxy_admin_service_stub.get_iam_policy request, options do |result, operation|
279
+ yield result, operation if block_given?
280
+ return result
281
+ end
282
+ rescue ::Gapic::Rest::Error => e
283
+ raise ::Google::Cloud::Error.from_error(e)
284
+ end
285
+
286
+ ##
287
+ # Returns permissions that a caller has on the Identity-Aware Proxy protected
288
+ # resource.
289
+ # More information about managing access via IAP can be found at:
290
+ # https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
291
+ #
292
+ # @overload test_iam_permissions(request, options = nil)
293
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
294
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
295
+ #
296
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
297
+ # A request object representing the call parameters. Required. To specify no
298
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
299
+ # @param options [::Gapic::CallOptions, ::Hash]
300
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
301
+ #
302
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
303
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
304
+ # least one keyword argument is required. To specify no parameters, or to keep all
305
+ # the default parameter values, pass an empty Hash as a request object (see above).
306
+ #
307
+ # @param resource [::String]
308
+ # REQUIRED: The resource for which the policy detail is being requested.
309
+ # See the operation documentation for the appropriate value for this field.
310
+ # @param permissions [::Array<::String>]
311
+ # The set of permissions to check for the `resource`. Permissions with
312
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
313
+ # information see
314
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
315
+ # @yield [result, operation] Access the result along with the TransportOperation object
316
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
317
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
318
+ #
319
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
320
+ #
321
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
322
+ def test_iam_permissions request, options = nil
323
+ raise ::ArgumentError, "request must be provided" if request.nil?
324
+
325
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
326
+
327
+ # Converts hash and nil to an options object
328
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
329
+
330
+ # Customize the options with defaults
331
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
332
+
333
+ # Set x-goog-api-client and x-goog-user-project headers
334
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
335
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
336
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
337
+ transports_version_send: [:rest]
338
+
339
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
340
+
341
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
342
+ metadata: call_metadata,
343
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
344
+
345
+ options.apply_defaults timeout: @config.timeout,
346
+ metadata: @config.metadata,
347
+ retry_policy: @config.retry_policy
348
+
349
+ @identity_aware_proxy_admin_service_stub.test_iam_permissions request, options do |result, operation|
350
+ yield result, operation if block_given?
351
+ return result
352
+ end
353
+ rescue ::Gapic::Rest::Error => e
354
+ raise ::Google::Cloud::Error.from_error(e)
355
+ end
356
+
357
+ ##
358
+ # Gets the IAP settings on a particular IAP protected resource.
359
+ #
360
+ # @overload get_iap_settings(request, options = nil)
361
+ # Pass arguments to `get_iap_settings` via a request object, either of type
362
+ # {::Google::Cloud::Iap::V1::GetIapSettingsRequest} or an equivalent Hash.
363
+ #
364
+ # @param request [::Google::Cloud::Iap::V1::GetIapSettingsRequest, ::Hash]
365
+ # A request object representing the call parameters. Required. To specify no
366
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
367
+ # @param options [::Gapic::CallOptions, ::Hash]
368
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
369
+ #
370
+ # @overload get_iap_settings(name: nil)
371
+ # Pass arguments to `get_iap_settings` via keyword arguments. Note that at
372
+ # least one keyword argument is required. To specify no parameters, or to keep all
373
+ # the default parameter values, pass an empty Hash as a request object (see above).
374
+ #
375
+ # @param name [::String]
376
+ # Required. The resource name for which to retrieve the settings.
377
+ # Authorization: Requires the `getSettings` permission for the associated
378
+ # resource.
379
+ # @yield [result, operation] Access the result along with the TransportOperation object
380
+ # @yieldparam result [::Google::Cloud::Iap::V1::IapSettings]
381
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
382
+ #
383
+ # @return [::Google::Cloud::Iap::V1::IapSettings]
384
+ #
385
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
386
+ def get_iap_settings request, options = nil
387
+ raise ::ArgumentError, "request must be provided" if request.nil?
388
+
389
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::GetIapSettingsRequest
390
+
391
+ # Converts hash and nil to an options object
392
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
393
+
394
+ # Customize the options with defaults
395
+ call_metadata = @config.rpcs.get_iap_settings.metadata.to_h
396
+
397
+ # Set x-goog-api-client and x-goog-user-project headers
398
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
399
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
400
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
401
+ transports_version_send: [:rest]
402
+
403
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
404
+
405
+ options.apply_defaults timeout: @config.rpcs.get_iap_settings.timeout,
406
+ metadata: call_metadata,
407
+ retry_policy: @config.rpcs.get_iap_settings.retry_policy
408
+
409
+ options.apply_defaults timeout: @config.timeout,
410
+ metadata: @config.metadata,
411
+ retry_policy: @config.retry_policy
412
+
413
+ @identity_aware_proxy_admin_service_stub.get_iap_settings request, options do |result, operation|
414
+ yield result, operation if block_given?
415
+ return result
416
+ end
417
+ rescue ::Gapic::Rest::Error => e
418
+ raise ::Google::Cloud::Error.from_error(e)
419
+ end
420
+
421
+ ##
422
+ # Updates the IAP settings on a particular IAP protected resource. It
423
+ # replaces all fields unless the `update_mask` is set.
424
+ #
425
+ # @overload update_iap_settings(request, options = nil)
426
+ # Pass arguments to `update_iap_settings` via a request object, either of type
427
+ # {::Google::Cloud::Iap::V1::UpdateIapSettingsRequest} or an equivalent Hash.
428
+ #
429
+ # @param request [::Google::Cloud::Iap::V1::UpdateIapSettingsRequest, ::Hash]
430
+ # A request object representing the call parameters. Required. To specify no
431
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
432
+ # @param options [::Gapic::CallOptions, ::Hash]
433
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
434
+ #
435
+ # @overload update_iap_settings(iap_settings: nil, update_mask: nil)
436
+ # Pass arguments to `update_iap_settings` via keyword arguments. Note that at
437
+ # least one keyword argument is required. To specify no parameters, or to keep all
438
+ # the default parameter values, pass an empty Hash as a request object (see above).
439
+ #
440
+ # @param iap_settings [::Google::Cloud::Iap::V1::IapSettings, ::Hash]
441
+ # Required. The new values for the IAP settings to be updated.
442
+ # Authorization: Requires the `updateSettings` permission for the associated
443
+ # resource.
444
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
445
+ # The field mask specifying which IAP settings should be updated.
446
+ # If omitted, the all of the settings are updated. See
447
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
448
+ # @yield [result, operation] Access the result along with the TransportOperation object
449
+ # @yieldparam result [::Google::Cloud::Iap::V1::IapSettings]
450
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
451
+ #
452
+ # @return [::Google::Cloud::Iap::V1::IapSettings]
453
+ #
454
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
455
+ def update_iap_settings request, options = nil
456
+ raise ::ArgumentError, "request must be provided" if request.nil?
457
+
458
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::UpdateIapSettingsRequest
459
+
460
+ # Converts hash and nil to an options object
461
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
462
+
463
+ # Customize the options with defaults
464
+ call_metadata = @config.rpcs.update_iap_settings.metadata.to_h
465
+
466
+ # Set x-goog-api-client and x-goog-user-project headers
467
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
468
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
469
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
470
+ transports_version_send: [:rest]
471
+
472
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
473
+
474
+ options.apply_defaults timeout: @config.rpcs.update_iap_settings.timeout,
475
+ metadata: call_metadata,
476
+ retry_policy: @config.rpcs.update_iap_settings.retry_policy
477
+
478
+ options.apply_defaults timeout: @config.timeout,
479
+ metadata: @config.metadata,
480
+ retry_policy: @config.retry_policy
481
+
482
+ @identity_aware_proxy_admin_service_stub.update_iap_settings request, options do |result, operation|
483
+ yield result, operation if block_given?
484
+ return result
485
+ end
486
+ rescue ::Gapic::Rest::Error => e
487
+ raise ::Google::Cloud::Error.from_error(e)
488
+ end
489
+
490
+ ##
491
+ # Lists the existing TunnelDestGroups. To group across all locations, use a
492
+ # `-` as the location ID. For example:
493
+ # `/v1/projects/123/iap_tunnel/locations/-/destGroups`
494
+ #
495
+ # @overload list_tunnel_dest_groups(request, options = nil)
496
+ # Pass arguments to `list_tunnel_dest_groups` via a request object, either of type
497
+ # {::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest} or an equivalent Hash.
498
+ #
499
+ # @param request [::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest, ::Hash]
500
+ # A request object representing the call parameters. Required. To specify no
501
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
502
+ # @param options [::Gapic::CallOptions, ::Hash]
503
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
504
+ #
505
+ # @overload list_tunnel_dest_groups(parent: nil, page_size: nil, page_token: nil)
506
+ # Pass arguments to `list_tunnel_dest_groups` via keyword arguments. Note that at
507
+ # least one keyword argument is required. To specify no parameters, or to keep all
508
+ # the default parameter values, pass an empty Hash as a request object (see above).
509
+ #
510
+ # @param parent [::String]
511
+ # Required. Google Cloud Project ID and location.
512
+ # In the following format:
513
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}`.
514
+ # A `-` can be used for the location to group across all locations.
515
+ # @param page_size [::Integer]
516
+ # The maximum number of groups to return. The service might return fewer than
517
+ # this value.
518
+ # If unspecified, at most 100 groups are returned.
519
+ # The maximum value is 1000; values above 1000 are coerced to 1000.
520
+ # @param page_token [::String]
521
+ # A page token, received from a previous `ListTunnelDestGroups`
522
+ # call. Provide this to retrieve the subsequent page.
523
+ #
524
+ # When paginating, all other parameters provided to
525
+ # `ListTunnelDestGroups` must match the call that provided the page
526
+ # token.
527
+ # @yield [result, operation] Access the result along with the TransportOperation object
528
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Iap::V1::TunnelDestGroup>]
529
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
530
+ #
531
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Iap::V1::TunnelDestGroup>]
532
+ #
533
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
534
+ def list_tunnel_dest_groups request, options = nil
535
+ raise ::ArgumentError, "request must be provided" if request.nil?
536
+
537
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest
538
+
539
+ # Converts hash and nil to an options object
540
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
541
+
542
+ # Customize the options with defaults
543
+ call_metadata = @config.rpcs.list_tunnel_dest_groups.metadata.to_h
544
+
545
+ # Set x-goog-api-client and x-goog-user-project headers
546
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
547
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
548
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
549
+ transports_version_send: [:rest]
550
+
551
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
552
+
553
+ options.apply_defaults timeout: @config.rpcs.list_tunnel_dest_groups.timeout,
554
+ metadata: call_metadata,
555
+ retry_policy: @config.rpcs.list_tunnel_dest_groups.retry_policy
556
+
557
+ options.apply_defaults timeout: @config.timeout,
558
+ metadata: @config.metadata,
559
+ retry_policy: @config.retry_policy
560
+
561
+ @identity_aware_proxy_admin_service_stub.list_tunnel_dest_groups request, options do |result, operation|
562
+ result = ::Gapic::Rest::PagedEnumerable.new @identity_aware_proxy_admin_service_stub, :list_tunnel_dest_groups, "tunnel_dest_groups", request, result, options
563
+ yield result, operation if block_given?
564
+ return result
565
+ end
566
+ rescue ::Gapic::Rest::Error => e
567
+ raise ::Google::Cloud::Error.from_error(e)
568
+ end
569
+
570
+ ##
571
+ # Creates a new TunnelDestGroup.
572
+ #
573
+ # @overload create_tunnel_dest_group(request, options = nil)
574
+ # Pass arguments to `create_tunnel_dest_group` via a request object, either of type
575
+ # {::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest} or an equivalent Hash.
576
+ #
577
+ # @param request [::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest, ::Hash]
578
+ # A request object representing the call parameters. Required. To specify no
579
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
580
+ # @param options [::Gapic::CallOptions, ::Hash]
581
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
582
+ #
583
+ # @overload create_tunnel_dest_group(parent: nil, tunnel_dest_group: nil, tunnel_dest_group_id: nil)
584
+ # Pass arguments to `create_tunnel_dest_group` via keyword arguments. Note that at
585
+ # least one keyword argument is required. To specify no parameters, or to keep all
586
+ # the default parameter values, pass an empty Hash as a request object (see above).
587
+ #
588
+ # @param parent [::String]
589
+ # Required. Google Cloud Project ID and location.
590
+ # In the following format:
591
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}`.
592
+ # @param tunnel_dest_group [::Google::Cloud::Iap::V1::TunnelDestGroup, ::Hash]
593
+ # Required. The TunnelDestGroup to create.
594
+ # @param tunnel_dest_group_id [::String]
595
+ # Required. The ID to use for the TunnelDestGroup, which becomes the final
596
+ # component of the resource name.
597
+ #
598
+ # This value must be 4-63 characters, and valid characters
599
+ # are `[a-z]-`.
600
+ # @yield [result, operation] Access the result along with the TransportOperation object
601
+ # @yieldparam result [::Google::Cloud::Iap::V1::TunnelDestGroup]
602
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
603
+ #
604
+ # @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
605
+ #
606
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
607
+ def create_tunnel_dest_group request, options = nil
608
+ raise ::ArgumentError, "request must be provided" if request.nil?
609
+
610
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest
611
+
612
+ # Converts hash and nil to an options object
613
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
614
+
615
+ # Customize the options with defaults
616
+ call_metadata = @config.rpcs.create_tunnel_dest_group.metadata.to_h
617
+
618
+ # Set x-goog-api-client and x-goog-user-project headers
619
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
620
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
621
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
622
+ transports_version_send: [:rest]
623
+
624
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
625
+
626
+ options.apply_defaults timeout: @config.rpcs.create_tunnel_dest_group.timeout,
627
+ metadata: call_metadata,
628
+ retry_policy: @config.rpcs.create_tunnel_dest_group.retry_policy
629
+
630
+ options.apply_defaults timeout: @config.timeout,
631
+ metadata: @config.metadata,
632
+ retry_policy: @config.retry_policy
633
+
634
+ @identity_aware_proxy_admin_service_stub.create_tunnel_dest_group request, options do |result, operation|
635
+ yield result, operation if block_given?
636
+ return result
637
+ end
638
+ rescue ::Gapic::Rest::Error => e
639
+ raise ::Google::Cloud::Error.from_error(e)
640
+ end
641
+
642
+ ##
643
+ # Retrieves an existing TunnelDestGroup.
644
+ #
645
+ # @overload get_tunnel_dest_group(request, options = nil)
646
+ # Pass arguments to `get_tunnel_dest_group` via a request object, either of type
647
+ # {::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest} or an equivalent Hash.
648
+ #
649
+ # @param request [::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest, ::Hash]
650
+ # A request object representing the call parameters. Required. To specify no
651
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
652
+ # @param options [::Gapic::CallOptions, ::Hash]
653
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
654
+ #
655
+ # @overload get_tunnel_dest_group(name: nil)
656
+ # Pass arguments to `get_tunnel_dest_group` via keyword arguments. Note that at
657
+ # least one keyword argument is required. To specify no parameters, or to keep all
658
+ # the default parameter values, pass an empty Hash as a request object (see above).
659
+ #
660
+ # @param name [::String]
661
+ # Required. Name of the TunnelDestGroup to be fetched.
662
+ # In the following format:
663
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
664
+ # @yield [result, operation] Access the result along with the TransportOperation object
665
+ # @yieldparam result [::Google::Cloud::Iap::V1::TunnelDestGroup]
666
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
667
+ #
668
+ # @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
669
+ #
670
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
671
+ def get_tunnel_dest_group request, options = nil
672
+ raise ::ArgumentError, "request must be provided" if request.nil?
673
+
674
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest
675
+
676
+ # Converts hash and nil to an options object
677
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
678
+
679
+ # Customize the options with defaults
680
+ call_metadata = @config.rpcs.get_tunnel_dest_group.metadata.to_h
681
+
682
+ # Set x-goog-api-client and x-goog-user-project headers
683
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
684
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
685
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
686
+ transports_version_send: [:rest]
687
+
688
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
689
+
690
+ options.apply_defaults timeout: @config.rpcs.get_tunnel_dest_group.timeout,
691
+ metadata: call_metadata,
692
+ retry_policy: @config.rpcs.get_tunnel_dest_group.retry_policy
693
+
694
+ options.apply_defaults timeout: @config.timeout,
695
+ metadata: @config.metadata,
696
+ retry_policy: @config.retry_policy
697
+
698
+ @identity_aware_proxy_admin_service_stub.get_tunnel_dest_group request, options do |result, operation|
699
+ yield result, operation if block_given?
700
+ return result
701
+ end
702
+ rescue ::Gapic::Rest::Error => e
703
+ raise ::Google::Cloud::Error.from_error(e)
704
+ end
705
+
706
+ ##
707
+ # Deletes a TunnelDestGroup.
708
+ #
709
+ # @overload delete_tunnel_dest_group(request, options = nil)
710
+ # Pass arguments to `delete_tunnel_dest_group` via a request object, either of type
711
+ # {::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest} or an equivalent Hash.
712
+ #
713
+ # @param request [::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest, ::Hash]
714
+ # A request object representing the call parameters. Required. To specify no
715
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
716
+ # @param options [::Gapic::CallOptions, ::Hash]
717
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
718
+ #
719
+ # @overload delete_tunnel_dest_group(name: nil)
720
+ # Pass arguments to `delete_tunnel_dest_group` via keyword arguments. Note that at
721
+ # least one keyword argument is required. To specify no parameters, or to keep all
722
+ # the default parameter values, pass an empty Hash as a request object (see above).
723
+ #
724
+ # @param name [::String]
725
+ # Required. Name of the TunnelDestGroup to delete.
726
+ # In the following format:
727
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
728
+ # @yield [result, operation] Access the result along with the TransportOperation object
729
+ # @yieldparam result [::Google::Protobuf::Empty]
730
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
731
+ #
732
+ # @return [::Google::Protobuf::Empty]
733
+ #
734
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
735
+ def delete_tunnel_dest_group request, options = nil
736
+ raise ::ArgumentError, "request must be provided" if request.nil?
737
+
738
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest
739
+
740
+ # Converts hash and nil to an options object
741
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
742
+
743
+ # Customize the options with defaults
744
+ call_metadata = @config.rpcs.delete_tunnel_dest_group.metadata.to_h
745
+
746
+ # Set x-goog-api-client and x-goog-user-project headers
747
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
748
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
749
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
750
+ transports_version_send: [:rest]
751
+
752
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
753
+
754
+ options.apply_defaults timeout: @config.rpcs.delete_tunnel_dest_group.timeout,
755
+ metadata: call_metadata,
756
+ retry_policy: @config.rpcs.delete_tunnel_dest_group.retry_policy
757
+
758
+ options.apply_defaults timeout: @config.timeout,
759
+ metadata: @config.metadata,
760
+ retry_policy: @config.retry_policy
761
+
762
+ @identity_aware_proxy_admin_service_stub.delete_tunnel_dest_group request, options do |result, operation|
763
+ yield result, operation if block_given?
764
+ return result
765
+ end
766
+ rescue ::Gapic::Rest::Error => e
767
+ raise ::Google::Cloud::Error.from_error(e)
768
+ end
769
+
770
+ ##
771
+ # Updates a TunnelDestGroup.
772
+ #
773
+ # @overload update_tunnel_dest_group(request, options = nil)
774
+ # Pass arguments to `update_tunnel_dest_group` via a request object, either of type
775
+ # {::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest} or an equivalent Hash.
776
+ #
777
+ # @param request [::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest, ::Hash]
778
+ # A request object representing the call parameters. Required. To specify no
779
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
780
+ # @param options [::Gapic::CallOptions, ::Hash]
781
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
782
+ #
783
+ # @overload update_tunnel_dest_group(tunnel_dest_group: nil, update_mask: nil)
784
+ # Pass arguments to `update_tunnel_dest_group` via keyword arguments. Note that at
785
+ # least one keyword argument is required. To specify no parameters, or to keep all
786
+ # the default parameter values, pass an empty Hash as a request object (see above).
787
+ #
788
+ # @param tunnel_dest_group [::Google::Cloud::Iap::V1::TunnelDestGroup, ::Hash]
789
+ # Required. The new values for the TunnelDestGroup.
790
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
791
+ # A field mask that specifies which IAP settings to update.
792
+ # If omitted, then all of the settings are updated. See
793
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
794
+ # @yield [result, operation] Access the result along with the TransportOperation object
795
+ # @yieldparam result [::Google::Cloud::Iap::V1::TunnelDestGroup]
796
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
797
+ #
798
+ # @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
799
+ #
800
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
801
+ def update_tunnel_dest_group request, options = nil
802
+ raise ::ArgumentError, "request must be provided" if request.nil?
803
+
804
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest
805
+
806
+ # Converts hash and nil to an options object
807
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
808
+
809
+ # Customize the options with defaults
810
+ call_metadata = @config.rpcs.update_tunnel_dest_group.metadata.to_h
811
+
812
+ # Set x-goog-api-client and x-goog-user-project headers
813
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
814
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
815
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
816
+ transports_version_send: [:rest]
817
+
818
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
819
+
820
+ options.apply_defaults timeout: @config.rpcs.update_tunnel_dest_group.timeout,
821
+ metadata: call_metadata,
822
+ retry_policy: @config.rpcs.update_tunnel_dest_group.retry_policy
823
+
824
+ options.apply_defaults timeout: @config.timeout,
825
+ metadata: @config.metadata,
826
+ retry_policy: @config.retry_policy
827
+
828
+ @identity_aware_proxy_admin_service_stub.update_tunnel_dest_group request, options do |result, operation|
829
+ yield result, operation if block_given?
830
+ return result
831
+ end
832
+ rescue ::Gapic::Rest::Error => e
833
+ raise ::Google::Cloud::Error.from_error(e)
834
+ end
835
+
836
+ ##
837
+ # Configuration class for the IdentityAwareProxyAdminService REST API.
838
+ #
839
+ # This class represents the configuration for IdentityAwareProxyAdminService REST,
840
+ # providing control over timeouts, retry behavior, logging, transport
841
+ # parameters, and other low-level controls. Certain parameters can also be
842
+ # applied individually to specific RPCs. See
843
+ # {::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::Client::Configuration::Rpcs}
844
+ # for a list of RPCs that can be configured independently.
845
+ #
846
+ # Configuration can be applied globally to all clients, or to a single client
847
+ # on construction.
848
+ #
849
+ # @example
850
+ #
851
+ # # Modify the global config, setting the timeout for
852
+ # # set_iam_policy to 20 seconds,
853
+ # # and all remaining timeouts to 10 seconds.
854
+ # ::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::Client.configure do |config|
855
+ # config.timeout = 10.0
856
+ # config.rpcs.set_iam_policy.timeout = 20.0
857
+ # end
858
+ #
859
+ # # Apply the above configuration only to a new client.
860
+ # client = ::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::Client.new do |config|
861
+ # config.timeout = 10.0
862
+ # config.rpcs.set_iam_policy.timeout = 20.0
863
+ # end
864
+ #
865
+ # @!attribute [rw] endpoint
866
+ # The hostname or hostname:port of the service endpoint.
867
+ # Defaults to `"iap.googleapis.com"`.
868
+ # @return [::String]
869
+ # @!attribute [rw] credentials
870
+ # Credentials to send with calls. You may provide any of the following types:
871
+ # * (`String`) The path to a service account key file in JSON format
872
+ # * (`Hash`) A service account key as a Hash
873
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
874
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
875
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
876
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
877
+ # * (`nil`) indicating no credentials
878
+ # @return [::Object]
879
+ # @!attribute [rw] scope
880
+ # The OAuth scopes
881
+ # @return [::Array<::String>]
882
+ # @!attribute [rw] lib_name
883
+ # The library name as recorded in instrumentation and logging
884
+ # @return [::String]
885
+ # @!attribute [rw] lib_version
886
+ # The library version as recorded in instrumentation and logging
887
+ # @return [::String]
888
+ # @!attribute [rw] timeout
889
+ # The call timeout in seconds.
890
+ # @return [::Numeric]
891
+ # @!attribute [rw] metadata
892
+ # Additional headers to be sent with the call.
893
+ # @return [::Hash{::Symbol=>::String}]
894
+ # @!attribute [rw] retry_policy
895
+ # The retry policy. The value is a hash with the following keys:
896
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
897
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
898
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
899
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
900
+ # trigger a retry.
901
+ # @return [::Hash]
902
+ # @!attribute [rw] quota_project
903
+ # A separate project against which to charge quota.
904
+ # @return [::String]
905
+ #
906
+ class Configuration
907
+ extend ::Gapic::Config
908
+
909
+ config_attr :endpoint, "iap.googleapis.com", ::String
910
+ config_attr :credentials, nil do |value|
911
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
912
+ allowed.any? { |klass| klass === value }
913
+ end
914
+ config_attr :scope, nil, ::String, ::Array, nil
915
+ config_attr :lib_name, nil, ::String, nil
916
+ config_attr :lib_version, nil, ::String, nil
917
+ config_attr :timeout, nil, ::Numeric, nil
918
+ config_attr :metadata, nil, ::Hash, nil
919
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
920
+ config_attr :quota_project, nil, ::String, nil
921
+
922
+ # @private
923
+ def initialize parent_config = nil
924
+ @parent_config = parent_config unless parent_config.nil?
925
+
926
+ yield self if block_given?
927
+ end
928
+
929
+ ##
930
+ # Configurations for individual RPCs
931
+ # @return [Rpcs]
932
+ #
933
+ def rpcs
934
+ @rpcs ||= begin
935
+ parent_rpcs = nil
936
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
937
+ Rpcs.new parent_rpcs
938
+ end
939
+ end
940
+
941
+ ##
942
+ # Configuration RPC class for the IdentityAwareProxyAdminService API.
943
+ #
944
+ # Includes fields providing the configuration for each RPC in this service.
945
+ # Each configuration object is of type `Gapic::Config::Method` and includes
946
+ # the following configuration fields:
947
+ #
948
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
949
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
950
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
951
+ # include the following keys:
952
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
953
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
954
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
955
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
956
+ # trigger a retry.
957
+ #
958
+ class Rpcs
959
+ ##
960
+ # RPC-specific configuration for `set_iam_policy`
961
+ # @return [::Gapic::Config::Method]
962
+ #
963
+ attr_reader :set_iam_policy
964
+ ##
965
+ # RPC-specific configuration for `get_iam_policy`
966
+ # @return [::Gapic::Config::Method]
967
+ #
968
+ attr_reader :get_iam_policy
969
+ ##
970
+ # RPC-specific configuration for `test_iam_permissions`
971
+ # @return [::Gapic::Config::Method]
972
+ #
973
+ attr_reader :test_iam_permissions
974
+ ##
975
+ # RPC-specific configuration for `get_iap_settings`
976
+ # @return [::Gapic::Config::Method]
977
+ #
978
+ attr_reader :get_iap_settings
979
+ ##
980
+ # RPC-specific configuration for `update_iap_settings`
981
+ # @return [::Gapic::Config::Method]
982
+ #
983
+ attr_reader :update_iap_settings
984
+ ##
985
+ # RPC-specific configuration for `list_tunnel_dest_groups`
986
+ # @return [::Gapic::Config::Method]
987
+ #
988
+ attr_reader :list_tunnel_dest_groups
989
+ ##
990
+ # RPC-specific configuration for `create_tunnel_dest_group`
991
+ # @return [::Gapic::Config::Method]
992
+ #
993
+ attr_reader :create_tunnel_dest_group
994
+ ##
995
+ # RPC-specific configuration for `get_tunnel_dest_group`
996
+ # @return [::Gapic::Config::Method]
997
+ #
998
+ attr_reader :get_tunnel_dest_group
999
+ ##
1000
+ # RPC-specific configuration for `delete_tunnel_dest_group`
1001
+ # @return [::Gapic::Config::Method]
1002
+ #
1003
+ attr_reader :delete_tunnel_dest_group
1004
+ ##
1005
+ # RPC-specific configuration for `update_tunnel_dest_group`
1006
+ # @return [::Gapic::Config::Method]
1007
+ #
1008
+ attr_reader :update_tunnel_dest_group
1009
+
1010
+ # @private
1011
+ def initialize parent_rpcs = nil
1012
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1013
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1014
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
1015
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1016
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1017
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1018
+ get_iap_settings_config = parent_rpcs.get_iap_settings if parent_rpcs.respond_to? :get_iap_settings
1019
+ @get_iap_settings = ::Gapic::Config::Method.new get_iap_settings_config
1020
+ update_iap_settings_config = parent_rpcs.update_iap_settings if parent_rpcs.respond_to? :update_iap_settings
1021
+ @update_iap_settings = ::Gapic::Config::Method.new update_iap_settings_config
1022
+ list_tunnel_dest_groups_config = parent_rpcs.list_tunnel_dest_groups if parent_rpcs.respond_to? :list_tunnel_dest_groups
1023
+ @list_tunnel_dest_groups = ::Gapic::Config::Method.new list_tunnel_dest_groups_config
1024
+ create_tunnel_dest_group_config = parent_rpcs.create_tunnel_dest_group if parent_rpcs.respond_to? :create_tunnel_dest_group
1025
+ @create_tunnel_dest_group = ::Gapic::Config::Method.new create_tunnel_dest_group_config
1026
+ get_tunnel_dest_group_config = parent_rpcs.get_tunnel_dest_group if parent_rpcs.respond_to? :get_tunnel_dest_group
1027
+ @get_tunnel_dest_group = ::Gapic::Config::Method.new get_tunnel_dest_group_config
1028
+ delete_tunnel_dest_group_config = parent_rpcs.delete_tunnel_dest_group if parent_rpcs.respond_to? :delete_tunnel_dest_group
1029
+ @delete_tunnel_dest_group = ::Gapic::Config::Method.new delete_tunnel_dest_group_config
1030
+ update_tunnel_dest_group_config = parent_rpcs.update_tunnel_dest_group if parent_rpcs.respond_to? :update_tunnel_dest_group
1031
+ @update_tunnel_dest_group = ::Gapic::Config::Method.new update_tunnel_dest_group_config
1032
+
1033
+ yield self if block_given?
1034
+ end
1035
+ end
1036
+ end
1037
+ end
1038
+ end
1039
+ end
1040
+ end
1041
+ end
1042
+ end
1043
+ end