google-cloud-iap-v1 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1046 @@
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, then all of the settings are updated. See
447
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
448
+ #
449
+ # Note: All IAP reauth settings must always be set together, using the
450
+ # field mask: `iapSettings.accessSettings.reauthSettings`.
451
+ # @yield [result, operation] Access the result along with the TransportOperation object
452
+ # @yieldparam result [::Google::Cloud::Iap::V1::IapSettings]
453
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
454
+ #
455
+ # @return [::Google::Cloud::Iap::V1::IapSettings]
456
+ #
457
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
458
+ def update_iap_settings request, options = nil
459
+ raise ::ArgumentError, "request must be provided" if request.nil?
460
+
461
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::UpdateIapSettingsRequest
462
+
463
+ # Converts hash and nil to an options object
464
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
465
+
466
+ # Customize the options with defaults
467
+ call_metadata = @config.rpcs.update_iap_settings.metadata.to_h
468
+
469
+ # Set x-goog-api-client and x-goog-user-project headers
470
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
471
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
472
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
473
+ transports_version_send: [:rest]
474
+
475
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
476
+
477
+ options.apply_defaults timeout: @config.rpcs.update_iap_settings.timeout,
478
+ metadata: call_metadata,
479
+ retry_policy: @config.rpcs.update_iap_settings.retry_policy
480
+
481
+ options.apply_defaults timeout: @config.timeout,
482
+ metadata: @config.metadata,
483
+ retry_policy: @config.retry_policy
484
+
485
+ @identity_aware_proxy_admin_service_stub.update_iap_settings request, options do |result, operation|
486
+ yield result, operation if block_given?
487
+ return result
488
+ end
489
+ rescue ::Gapic::Rest::Error => e
490
+ raise ::Google::Cloud::Error.from_error(e)
491
+ end
492
+
493
+ ##
494
+ # Lists the existing TunnelDestGroups. To group across all locations, use a
495
+ # `-` as the location ID. For example:
496
+ # `/v1/projects/123/iap_tunnel/locations/-/destGroups`
497
+ #
498
+ # @overload list_tunnel_dest_groups(request, options = nil)
499
+ # Pass arguments to `list_tunnel_dest_groups` via a request object, either of type
500
+ # {::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest} or an equivalent Hash.
501
+ #
502
+ # @param request [::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest, ::Hash]
503
+ # A request object representing the call parameters. Required. To specify no
504
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
505
+ # @param options [::Gapic::CallOptions, ::Hash]
506
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
507
+ #
508
+ # @overload list_tunnel_dest_groups(parent: nil, page_size: nil, page_token: nil)
509
+ # Pass arguments to `list_tunnel_dest_groups` via keyword arguments. Note that at
510
+ # least one keyword argument is required. To specify no parameters, or to keep all
511
+ # the default parameter values, pass an empty Hash as a request object (see above).
512
+ #
513
+ # @param parent [::String]
514
+ # Required. Google Cloud Project ID and location.
515
+ # In the following format:
516
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}`.
517
+ # A `-` can be used for the location to group across all locations.
518
+ # @param page_size [::Integer]
519
+ # The maximum number of groups to return. The service might return fewer than
520
+ # this value.
521
+ # If unspecified, at most 100 groups are returned.
522
+ # The maximum value is 1000; values above 1000 are coerced to 1000.
523
+ # @param page_token [::String]
524
+ # A page token, received from a previous `ListTunnelDestGroups`
525
+ # call. Provide this to retrieve the subsequent page.
526
+ #
527
+ # When paginating, all other parameters provided to
528
+ # `ListTunnelDestGroups` must match the call that provided the page
529
+ # token.
530
+ # @yield [result, operation] Access the result along with the TransportOperation object
531
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Iap::V1::TunnelDestGroup>]
532
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
533
+ #
534
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Iap::V1::TunnelDestGroup>]
535
+ #
536
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
537
+ def list_tunnel_dest_groups request, options = nil
538
+ raise ::ArgumentError, "request must be provided" if request.nil?
539
+
540
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest
541
+
542
+ # Converts hash and nil to an options object
543
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
544
+
545
+ # Customize the options with defaults
546
+ call_metadata = @config.rpcs.list_tunnel_dest_groups.metadata.to_h
547
+
548
+ # Set x-goog-api-client and x-goog-user-project headers
549
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
550
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
551
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
552
+ transports_version_send: [:rest]
553
+
554
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
555
+
556
+ options.apply_defaults timeout: @config.rpcs.list_tunnel_dest_groups.timeout,
557
+ metadata: call_metadata,
558
+ retry_policy: @config.rpcs.list_tunnel_dest_groups.retry_policy
559
+
560
+ options.apply_defaults timeout: @config.timeout,
561
+ metadata: @config.metadata,
562
+ retry_policy: @config.retry_policy
563
+
564
+ @identity_aware_proxy_admin_service_stub.list_tunnel_dest_groups request, options do |result, operation|
565
+ result = ::Gapic::Rest::PagedEnumerable.new @identity_aware_proxy_admin_service_stub, :list_tunnel_dest_groups, "tunnel_dest_groups", request, result, options
566
+ yield result, operation if block_given?
567
+ return result
568
+ end
569
+ rescue ::Gapic::Rest::Error => e
570
+ raise ::Google::Cloud::Error.from_error(e)
571
+ end
572
+
573
+ ##
574
+ # Creates a new TunnelDestGroup.
575
+ #
576
+ # @overload create_tunnel_dest_group(request, options = nil)
577
+ # Pass arguments to `create_tunnel_dest_group` via a request object, either of type
578
+ # {::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest} or an equivalent Hash.
579
+ #
580
+ # @param request [::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest, ::Hash]
581
+ # A request object representing the call parameters. Required. To specify no
582
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
583
+ # @param options [::Gapic::CallOptions, ::Hash]
584
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
585
+ #
586
+ # @overload create_tunnel_dest_group(parent: nil, tunnel_dest_group: nil, tunnel_dest_group_id: nil)
587
+ # Pass arguments to `create_tunnel_dest_group` via keyword arguments. Note that at
588
+ # least one keyword argument is required. To specify no parameters, or to keep all
589
+ # the default parameter values, pass an empty Hash as a request object (see above).
590
+ #
591
+ # @param parent [::String]
592
+ # Required. Google Cloud Project ID and location.
593
+ # In the following format:
594
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}`.
595
+ # @param tunnel_dest_group [::Google::Cloud::Iap::V1::TunnelDestGroup, ::Hash]
596
+ # Required. The TunnelDestGroup to create.
597
+ # @param tunnel_dest_group_id [::String]
598
+ # Required. The ID to use for the TunnelDestGroup, which becomes the final
599
+ # component of the resource name.
600
+ #
601
+ # This value must be 4-63 characters, and valid characters
602
+ # are `[a-z]-`.
603
+ # @yield [result, operation] Access the result along with the TransportOperation object
604
+ # @yieldparam result [::Google::Cloud::Iap::V1::TunnelDestGroup]
605
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
606
+ #
607
+ # @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
608
+ #
609
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
610
+ def create_tunnel_dest_group request, options = nil
611
+ raise ::ArgumentError, "request must be provided" if request.nil?
612
+
613
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest
614
+
615
+ # Converts hash and nil to an options object
616
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
617
+
618
+ # Customize the options with defaults
619
+ call_metadata = @config.rpcs.create_tunnel_dest_group.metadata.to_h
620
+
621
+ # Set x-goog-api-client and x-goog-user-project headers
622
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
623
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
624
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
625
+ transports_version_send: [:rest]
626
+
627
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
628
+
629
+ options.apply_defaults timeout: @config.rpcs.create_tunnel_dest_group.timeout,
630
+ metadata: call_metadata,
631
+ retry_policy: @config.rpcs.create_tunnel_dest_group.retry_policy
632
+
633
+ options.apply_defaults timeout: @config.timeout,
634
+ metadata: @config.metadata,
635
+ retry_policy: @config.retry_policy
636
+
637
+ @identity_aware_proxy_admin_service_stub.create_tunnel_dest_group request, options do |result, operation|
638
+ yield result, operation if block_given?
639
+ return result
640
+ end
641
+ rescue ::Gapic::Rest::Error => e
642
+ raise ::Google::Cloud::Error.from_error(e)
643
+ end
644
+
645
+ ##
646
+ # Retrieves an existing TunnelDestGroup.
647
+ #
648
+ # @overload get_tunnel_dest_group(request, options = nil)
649
+ # Pass arguments to `get_tunnel_dest_group` via a request object, either of type
650
+ # {::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest} or an equivalent Hash.
651
+ #
652
+ # @param request [::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest, ::Hash]
653
+ # A request object representing the call parameters. Required. To specify no
654
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
655
+ # @param options [::Gapic::CallOptions, ::Hash]
656
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
657
+ #
658
+ # @overload get_tunnel_dest_group(name: nil)
659
+ # Pass arguments to `get_tunnel_dest_group` via keyword arguments. Note that at
660
+ # least one keyword argument is required. To specify no parameters, or to keep all
661
+ # the default parameter values, pass an empty Hash as a request object (see above).
662
+ #
663
+ # @param name [::String]
664
+ # Required. Name of the TunnelDestGroup to be fetched.
665
+ # In the following format:
666
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
667
+ # @yield [result, operation] Access the result along with the TransportOperation object
668
+ # @yieldparam result [::Google::Cloud::Iap::V1::TunnelDestGroup]
669
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
670
+ #
671
+ # @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
672
+ #
673
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
674
+ def get_tunnel_dest_group request, options = nil
675
+ raise ::ArgumentError, "request must be provided" if request.nil?
676
+
677
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest
678
+
679
+ # Converts hash and nil to an options object
680
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
681
+
682
+ # Customize the options with defaults
683
+ call_metadata = @config.rpcs.get_tunnel_dest_group.metadata.to_h
684
+
685
+ # Set x-goog-api-client and x-goog-user-project headers
686
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
687
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
688
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
689
+ transports_version_send: [:rest]
690
+
691
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
692
+
693
+ options.apply_defaults timeout: @config.rpcs.get_tunnel_dest_group.timeout,
694
+ metadata: call_metadata,
695
+ retry_policy: @config.rpcs.get_tunnel_dest_group.retry_policy
696
+
697
+ options.apply_defaults timeout: @config.timeout,
698
+ metadata: @config.metadata,
699
+ retry_policy: @config.retry_policy
700
+
701
+ @identity_aware_proxy_admin_service_stub.get_tunnel_dest_group request, options do |result, operation|
702
+ yield result, operation if block_given?
703
+ return result
704
+ end
705
+ rescue ::Gapic::Rest::Error => e
706
+ raise ::Google::Cloud::Error.from_error(e)
707
+ end
708
+
709
+ ##
710
+ # Deletes a TunnelDestGroup.
711
+ #
712
+ # @overload delete_tunnel_dest_group(request, options = nil)
713
+ # Pass arguments to `delete_tunnel_dest_group` via a request object, either of type
714
+ # {::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest} or an equivalent Hash.
715
+ #
716
+ # @param request [::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest, ::Hash]
717
+ # A request object representing the call parameters. Required. To specify no
718
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
719
+ # @param options [::Gapic::CallOptions, ::Hash]
720
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
721
+ #
722
+ # @overload delete_tunnel_dest_group(name: nil)
723
+ # Pass arguments to `delete_tunnel_dest_group` via keyword arguments. Note that at
724
+ # least one keyword argument is required. To specify no parameters, or to keep all
725
+ # the default parameter values, pass an empty Hash as a request object (see above).
726
+ #
727
+ # @param name [::String]
728
+ # Required. Name of the TunnelDestGroup to delete.
729
+ # In the following format:
730
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
731
+ # @yield [result, operation] Access the result along with the TransportOperation object
732
+ # @yieldparam result [::Google::Protobuf::Empty]
733
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
734
+ #
735
+ # @return [::Google::Protobuf::Empty]
736
+ #
737
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
738
+ def delete_tunnel_dest_group request, options = nil
739
+ raise ::ArgumentError, "request must be provided" if request.nil?
740
+
741
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest
742
+
743
+ # Converts hash and nil to an options object
744
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
745
+
746
+ # Customize the options with defaults
747
+ call_metadata = @config.rpcs.delete_tunnel_dest_group.metadata.to_h
748
+
749
+ # Set x-goog-api-client and x-goog-user-project headers
750
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
751
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
752
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
753
+ transports_version_send: [:rest]
754
+
755
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
756
+
757
+ options.apply_defaults timeout: @config.rpcs.delete_tunnel_dest_group.timeout,
758
+ metadata: call_metadata,
759
+ retry_policy: @config.rpcs.delete_tunnel_dest_group.retry_policy
760
+
761
+ options.apply_defaults timeout: @config.timeout,
762
+ metadata: @config.metadata,
763
+ retry_policy: @config.retry_policy
764
+
765
+ @identity_aware_proxy_admin_service_stub.delete_tunnel_dest_group request, options do |result, operation|
766
+ yield result, operation if block_given?
767
+ return result
768
+ end
769
+ rescue ::Gapic::Rest::Error => e
770
+ raise ::Google::Cloud::Error.from_error(e)
771
+ end
772
+
773
+ ##
774
+ # Updates a TunnelDestGroup.
775
+ #
776
+ # @overload update_tunnel_dest_group(request, options = nil)
777
+ # Pass arguments to `update_tunnel_dest_group` via a request object, either of type
778
+ # {::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest} or an equivalent Hash.
779
+ #
780
+ # @param request [::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest, ::Hash]
781
+ # A request object representing the call parameters. Required. To specify no
782
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
783
+ # @param options [::Gapic::CallOptions, ::Hash]
784
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
785
+ #
786
+ # @overload update_tunnel_dest_group(tunnel_dest_group: nil, update_mask: nil)
787
+ # Pass arguments to `update_tunnel_dest_group` via keyword arguments. Note that at
788
+ # least one keyword argument is required. To specify no parameters, or to keep all
789
+ # the default parameter values, pass an empty Hash as a request object (see above).
790
+ #
791
+ # @param tunnel_dest_group [::Google::Cloud::Iap::V1::TunnelDestGroup, ::Hash]
792
+ # Required. The new values for the TunnelDestGroup.
793
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
794
+ # A field mask that specifies which IAP settings to update.
795
+ # If omitted, then all of the settings are updated. See
796
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
797
+ # @yield [result, operation] Access the result along with the TransportOperation object
798
+ # @yieldparam result [::Google::Cloud::Iap::V1::TunnelDestGroup]
799
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
800
+ #
801
+ # @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
802
+ #
803
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
804
+ def update_tunnel_dest_group request, options = nil
805
+ raise ::ArgumentError, "request must be provided" if request.nil?
806
+
807
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest
808
+
809
+ # Converts hash and nil to an options object
810
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
811
+
812
+ # Customize the options with defaults
813
+ call_metadata = @config.rpcs.update_tunnel_dest_group.metadata.to_h
814
+
815
+ # Set x-goog-api-client and x-goog-user-project headers
816
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
817
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
818
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION,
819
+ transports_version_send: [:rest]
820
+
821
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
822
+
823
+ options.apply_defaults timeout: @config.rpcs.update_tunnel_dest_group.timeout,
824
+ metadata: call_metadata,
825
+ retry_policy: @config.rpcs.update_tunnel_dest_group.retry_policy
826
+
827
+ options.apply_defaults timeout: @config.timeout,
828
+ metadata: @config.metadata,
829
+ retry_policy: @config.retry_policy
830
+
831
+ @identity_aware_proxy_admin_service_stub.update_tunnel_dest_group request, options do |result, operation|
832
+ yield result, operation if block_given?
833
+ return result
834
+ end
835
+ rescue ::Gapic::Rest::Error => e
836
+ raise ::Google::Cloud::Error.from_error(e)
837
+ end
838
+
839
+ ##
840
+ # Configuration class for the IdentityAwareProxyAdminService REST API.
841
+ #
842
+ # This class represents the configuration for IdentityAwareProxyAdminService REST,
843
+ # providing control over timeouts, retry behavior, logging, transport
844
+ # parameters, and other low-level controls. Certain parameters can also be
845
+ # applied individually to specific RPCs. See
846
+ # {::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::Client::Configuration::Rpcs}
847
+ # for a list of RPCs that can be configured independently.
848
+ #
849
+ # Configuration can be applied globally to all clients, or to a single client
850
+ # on construction.
851
+ #
852
+ # @example
853
+ #
854
+ # # Modify the global config, setting the timeout for
855
+ # # set_iam_policy to 20 seconds,
856
+ # # and all remaining timeouts to 10 seconds.
857
+ # ::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::Client.configure do |config|
858
+ # config.timeout = 10.0
859
+ # config.rpcs.set_iam_policy.timeout = 20.0
860
+ # end
861
+ #
862
+ # # Apply the above configuration only to a new client.
863
+ # client = ::Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Rest::Client.new do |config|
864
+ # config.timeout = 10.0
865
+ # config.rpcs.set_iam_policy.timeout = 20.0
866
+ # end
867
+ #
868
+ # @!attribute [rw] endpoint
869
+ # The hostname or hostname:port of the service endpoint.
870
+ # Defaults to `"iap.googleapis.com"`.
871
+ # @return [::String]
872
+ # @!attribute [rw] credentials
873
+ # Credentials to send with calls. You may provide any of the following types:
874
+ # * (`String`) The path to a service account key file in JSON format
875
+ # * (`Hash`) A service account key as a Hash
876
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
877
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
878
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
879
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
880
+ # * (`nil`) indicating no credentials
881
+ # @return [::Object]
882
+ # @!attribute [rw] scope
883
+ # The OAuth scopes
884
+ # @return [::Array<::String>]
885
+ # @!attribute [rw] lib_name
886
+ # The library name as recorded in instrumentation and logging
887
+ # @return [::String]
888
+ # @!attribute [rw] lib_version
889
+ # The library version as recorded in instrumentation and logging
890
+ # @return [::String]
891
+ # @!attribute [rw] timeout
892
+ # The call timeout in seconds.
893
+ # @return [::Numeric]
894
+ # @!attribute [rw] metadata
895
+ # Additional headers to be sent with the call.
896
+ # @return [::Hash{::Symbol=>::String}]
897
+ # @!attribute [rw] retry_policy
898
+ # The retry policy. The value is a hash with the following keys:
899
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
900
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
901
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
902
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
903
+ # trigger a retry.
904
+ # @return [::Hash]
905
+ # @!attribute [rw] quota_project
906
+ # A separate project against which to charge quota.
907
+ # @return [::String]
908
+ #
909
+ class Configuration
910
+ extend ::Gapic::Config
911
+
912
+ config_attr :endpoint, "iap.googleapis.com", ::String
913
+ config_attr :credentials, nil do |value|
914
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
915
+ allowed.any? { |klass| klass === value }
916
+ end
917
+ config_attr :scope, nil, ::String, ::Array, nil
918
+ config_attr :lib_name, nil, ::String, nil
919
+ config_attr :lib_version, nil, ::String, nil
920
+ config_attr :timeout, nil, ::Numeric, nil
921
+ config_attr :metadata, nil, ::Hash, nil
922
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
923
+ config_attr :quota_project, nil, ::String, nil
924
+
925
+ # @private
926
+ def initialize parent_config = nil
927
+ @parent_config = parent_config unless parent_config.nil?
928
+
929
+ yield self if block_given?
930
+ end
931
+
932
+ ##
933
+ # Configurations for individual RPCs
934
+ # @return [Rpcs]
935
+ #
936
+ def rpcs
937
+ @rpcs ||= begin
938
+ parent_rpcs = nil
939
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
940
+ Rpcs.new parent_rpcs
941
+ end
942
+ end
943
+
944
+ ##
945
+ # Configuration RPC class for the IdentityAwareProxyAdminService API.
946
+ #
947
+ # Includes fields providing the configuration for each RPC in this service.
948
+ # Each configuration object is of type `Gapic::Config::Method` and includes
949
+ # the following configuration fields:
950
+ #
951
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
952
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
953
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
954
+ # include the following keys:
955
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
956
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
957
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
958
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
959
+ # trigger a retry.
960
+ #
961
+ class Rpcs
962
+ ##
963
+ # RPC-specific configuration for `set_iam_policy`
964
+ # @return [::Gapic::Config::Method]
965
+ #
966
+ attr_reader :set_iam_policy
967
+ ##
968
+ # RPC-specific configuration for `get_iam_policy`
969
+ # @return [::Gapic::Config::Method]
970
+ #
971
+ attr_reader :get_iam_policy
972
+ ##
973
+ # RPC-specific configuration for `test_iam_permissions`
974
+ # @return [::Gapic::Config::Method]
975
+ #
976
+ attr_reader :test_iam_permissions
977
+ ##
978
+ # RPC-specific configuration for `get_iap_settings`
979
+ # @return [::Gapic::Config::Method]
980
+ #
981
+ attr_reader :get_iap_settings
982
+ ##
983
+ # RPC-specific configuration for `update_iap_settings`
984
+ # @return [::Gapic::Config::Method]
985
+ #
986
+ attr_reader :update_iap_settings
987
+ ##
988
+ # RPC-specific configuration for `list_tunnel_dest_groups`
989
+ # @return [::Gapic::Config::Method]
990
+ #
991
+ attr_reader :list_tunnel_dest_groups
992
+ ##
993
+ # RPC-specific configuration for `create_tunnel_dest_group`
994
+ # @return [::Gapic::Config::Method]
995
+ #
996
+ attr_reader :create_tunnel_dest_group
997
+ ##
998
+ # RPC-specific configuration for `get_tunnel_dest_group`
999
+ # @return [::Gapic::Config::Method]
1000
+ #
1001
+ attr_reader :get_tunnel_dest_group
1002
+ ##
1003
+ # RPC-specific configuration for `delete_tunnel_dest_group`
1004
+ # @return [::Gapic::Config::Method]
1005
+ #
1006
+ attr_reader :delete_tunnel_dest_group
1007
+ ##
1008
+ # RPC-specific configuration for `update_tunnel_dest_group`
1009
+ # @return [::Gapic::Config::Method]
1010
+ #
1011
+ attr_reader :update_tunnel_dest_group
1012
+
1013
+ # @private
1014
+ def initialize parent_rpcs = nil
1015
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1016
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1017
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
1018
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1019
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1020
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1021
+ get_iap_settings_config = parent_rpcs.get_iap_settings if parent_rpcs.respond_to? :get_iap_settings
1022
+ @get_iap_settings = ::Gapic::Config::Method.new get_iap_settings_config
1023
+ update_iap_settings_config = parent_rpcs.update_iap_settings if parent_rpcs.respond_to? :update_iap_settings
1024
+ @update_iap_settings = ::Gapic::Config::Method.new update_iap_settings_config
1025
+ list_tunnel_dest_groups_config = parent_rpcs.list_tunnel_dest_groups if parent_rpcs.respond_to? :list_tunnel_dest_groups
1026
+ @list_tunnel_dest_groups = ::Gapic::Config::Method.new list_tunnel_dest_groups_config
1027
+ create_tunnel_dest_group_config = parent_rpcs.create_tunnel_dest_group if parent_rpcs.respond_to? :create_tunnel_dest_group
1028
+ @create_tunnel_dest_group = ::Gapic::Config::Method.new create_tunnel_dest_group_config
1029
+ get_tunnel_dest_group_config = parent_rpcs.get_tunnel_dest_group if parent_rpcs.respond_to? :get_tunnel_dest_group
1030
+ @get_tunnel_dest_group = ::Gapic::Config::Method.new get_tunnel_dest_group_config
1031
+ delete_tunnel_dest_group_config = parent_rpcs.delete_tunnel_dest_group if parent_rpcs.respond_to? :delete_tunnel_dest_group
1032
+ @delete_tunnel_dest_group = ::Gapic::Config::Method.new delete_tunnel_dest_group_config
1033
+ update_tunnel_dest_group_config = parent_rpcs.update_tunnel_dest_group if parent_rpcs.respond_to? :update_tunnel_dest_group
1034
+ @update_tunnel_dest_group = ::Gapic::Config::Method.new update_tunnel_dest_group_config
1035
+
1036
+ yield self if block_given?
1037
+ end
1038
+ end
1039
+ end
1040
+ end
1041
+ end
1042
+ end
1043
+ end
1044
+ end
1045
+ end
1046
+ end