google-iam-v1 0.2.0 → 0.3.beta.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f319d1674be19338ae5719be3247ad6173d232de5351155b79ad395dff9baa9
4
- data.tar.gz: 06224b50d02566d9ed9ddb6fae4835ef8bcd2e44af52334bb8a216bef7b3519e
3
+ metadata.gz: 82b5591af8a5a0b9428f2c8f136d10418e7434659fdb4ec4f852699c889aecc8
4
+ data.tar.gz: ee7035a864f0282f43c73aa41bd5779840d433a35826e05e979c2b941ff55be1
5
5
  SHA512:
6
- metadata.gz: 3443bd1620cd459104e7c8cddec5242492526740e32236ede67668dd4a91840aad14ca695e72052baa8e68e69c8bbfe3fa7c9169c2dfec1499e4fca9cb091a83
7
- data.tar.gz: da2da208729cb8cf3fde14d04e9b6fde534291a7012311f98579dc10b3df42109439f81e989f202568cb294980e216007ba2fbad05fc9add3168f86efa0ef951
6
+ metadata.gz: d11b4cc09c09dcf20d1ee2e605adec53cc6c2af97a1f6e66548af69a5436b0f197bccbe4635c0cfbf6f9e40c93d7a86e469159f5f9f1bb340e3c09ac8c012d63
7
+ data.tar.gz: aab1c24a1c3dc8df6f0e3109a2bb17403eb2a41bb23be83efb23885f0ea0e5cef3461d2ed8d26c6244b53f836a935685e4d5cd0204742962cb118fe35352c95b
@@ -0,0 +1,561 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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/iam/v1/iam_policy_pb"
21
+ require "google/iam/v1/iam_policy/rest/service_stub"
22
+
23
+ module Google
24
+ module Iam
25
+ module V1
26
+ module IAMPolicy
27
+ module Rest
28
+ ##
29
+ # REST client for the IAMPolicy service.
30
+ #
31
+ # API Overview
32
+ #
33
+ #
34
+ # Manages Identity and Access Management (IAM) policies.
35
+ #
36
+ # Any implementation of an API that offers access control features
37
+ # implements the google.iam.v1.IAMPolicy interface.
38
+ #
39
+ # ## Data model
40
+ #
41
+ # Access control is applied when a principal (user or service account), takes
42
+ # some action on a resource exposed by a service. Resources, identified by
43
+ # URI-like names, are the unit of access control specification. Service
44
+ # implementations can choose the granularity of access control and the
45
+ # supported permissions for their resources.
46
+ # For example one database service may allow access control to be
47
+ # specified only at the Table level, whereas another might allow access control
48
+ # to also be specified at the Column level.
49
+ #
50
+ # ## Policy Structure
51
+ #
52
+ # See google.iam.v1.Policy
53
+ #
54
+ # This is intentionally not a CRUD style API because access control policies
55
+ # are created and deleted implicitly with the resources to which they are
56
+ # attached.
57
+ #
58
+ class Client
59
+ # @private
60
+ attr_reader :iam_policy_stub
61
+
62
+ ##
63
+ # Configure the IAMPolicy Client class.
64
+ #
65
+ # See {::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration}
66
+ # for a description of the configuration fields.
67
+ #
68
+ # @example
69
+ #
70
+ # # Modify the configuration for all IAMPolicy clients
71
+ # ::Google::Iam::V1::IAMPolicy::Rest::Client.configure do |config|
72
+ # config.timeout = 10.0
73
+ # end
74
+ #
75
+ # @yield [config] Configure the Client client.
76
+ # @yieldparam config [Client::Configuration]
77
+ #
78
+ # @return [Client::Configuration]
79
+ #
80
+ def self.configure
81
+ @configure ||= begin
82
+ namespace = ["Google", "Iam", "V1"]
83
+ parent_config = while namespace.any?
84
+ parent_name = namespace.join "::"
85
+ parent_const = const_get parent_name
86
+ break parent_const.configure if parent_const.respond_to? :configure
87
+ namespace.pop
88
+ end
89
+ default_config = Client::Configuration.new parent_config
90
+
91
+ default_config
92
+ end
93
+ yield @configure if block_given?
94
+ @configure
95
+ end
96
+
97
+ ##
98
+ # Configure the IAMPolicy Client instance.
99
+ #
100
+ # The configuration is set to the derived mode, meaning that values can be changed,
101
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
102
+ # should be made on {Client.configure}.
103
+ #
104
+ # See {::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration}
105
+ # for a description of the configuration fields.
106
+ #
107
+ # @yield [config] Configure the Client client.
108
+ # @yieldparam config [Client::Configuration]
109
+ #
110
+ # @return [Client::Configuration]
111
+ #
112
+ def configure
113
+ yield @config if block_given?
114
+ @config
115
+ end
116
+
117
+ ##
118
+ # Create a new IAMPolicy REST client object.
119
+ #
120
+ # @example
121
+ #
122
+ # # Create a client using the default configuration
123
+ # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new
124
+ #
125
+ # # Create a client using a custom configuration
126
+ # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
127
+ # config.timeout = 10.0
128
+ # end
129
+ #
130
+ # @yield [config] Configure the IAMPolicy client.
131
+ # @yieldparam config [Client::Configuration]
132
+ #
133
+ def initialize
134
+ # Create the configuration object
135
+ @config = Configuration.new Client.configure
136
+
137
+ # Yield the configuration if needed
138
+ yield @config if block_given?
139
+
140
+ # Create credentials
141
+ credentials = @config.credentials
142
+ # Use self-signed JWT if the endpoint is unchanged from default,
143
+ # but only if the default endpoint does not have a region prefix.
144
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
145
+ !@config.endpoint.split(".").first.include?("-")
146
+ credentials ||= Credentials.default scope: @config.scope,
147
+ enable_self_signed_jwt: enable_self_signed_jwt
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
149
+ credentials = Credentials.new credentials, scope: @config.scope
150
+ end
151
+
152
+ @quota_project_id = @config.quota_project
153
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
154
+
155
+ @iam_policy_stub = ::Google::Iam::V1::IAMPolicy::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
156
+ end
157
+
158
+ # Service calls
159
+
160
+ ##
161
+ # Sets the access control policy on the specified resource. Replaces any
162
+ # existing policy.
163
+ #
164
+ # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
165
+ #
166
+ # @overload set_iam_policy(request, options = nil)
167
+ # Pass arguments to `set_iam_policy` via a request object, either of type
168
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
169
+ #
170
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
171
+ # A request object representing the call parameters. Required. To specify no
172
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
173
+ # @param options [::Gapic::CallOptions, ::Hash]
174
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
175
+ #
176
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
177
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
178
+ # least one keyword argument is required. To specify no parameters, or to keep all
179
+ # the default parameter values, pass an empty Hash as a request object (see above).
180
+ #
181
+ # @param resource [::String]
182
+ # REQUIRED: The resource for which the policy is being specified.
183
+ # See the operation documentation for the appropriate value for this field.
184
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
185
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
186
+ # the policy is limited to a few 10s of KB. An empty policy is a
187
+ # valid policy but certain Cloud Platform services (such as Projects)
188
+ # might reject them.
189
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
190
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
191
+ # the fields in the mask will be modified. If no mask is provided, the
192
+ # following default mask is used:
193
+ #
194
+ # `paths: "bindings, etag"`
195
+ # @yield [result, response] Access the result along with the Faraday response object
196
+ # @yieldparam result [::Google::Iam::V1::Policy]
197
+ # @yieldparam response [::Faraday::Response]
198
+ #
199
+ # @return [::Google::Iam::V1::Policy]
200
+ #
201
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
202
+ def set_iam_policy request, options = nil
203
+ raise ::ArgumentError, "request must be provided" if request.nil?
204
+
205
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
206
+
207
+ # Converts hash and nil to an options object
208
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
209
+
210
+ # Customize the options with defaults
211
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
212
+
213
+ # Set x-goog-api-client and x-goog-user-project headers
214
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
215
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
216
+ gapic_version: ::Google::Iam::V1::VERSION,
217
+ transports_version_send: [:rest]
218
+
219
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
220
+
221
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
222
+ metadata: call_metadata,
223
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
224
+
225
+ options.apply_defaults timeout: @config.timeout,
226
+ metadata: @config.metadata,
227
+ retry_policy: @config.retry_policy
228
+
229
+ bindings_override = @config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"]
230
+
231
+ @iam_policy_stub.set_iam_policy request, options, bindings_override: bindings_override do |result, response|
232
+ yield result, response if block_given?
233
+ return result
234
+ end
235
+ rescue ::Faraday::Error => e
236
+ begin
237
+ raise ::Gapic::Rest::Error.wrap_faraday_error e
238
+ rescue ::Gapic::Rest::Error => gapic_error
239
+ raise ::Google::Cloud::Error.from_error gapic_error
240
+ end
241
+ end
242
+
243
+ ##
244
+ # Gets the access control policy for a resource.
245
+ # Returns an empty policy if the resource exists and does not have a policy
246
+ # set.
247
+ #
248
+ # @overload get_iam_policy(request, options = nil)
249
+ # Pass arguments to `get_iam_policy` via a request object, either of type
250
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
251
+ #
252
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
253
+ # A request object representing the call parameters. Required. To specify no
254
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
255
+ # @param options [::Gapic::CallOptions, ::Hash]
256
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
257
+ #
258
+ # @overload get_iam_policy(resource: nil, options: nil)
259
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
260
+ # least one keyword argument is required. To specify no parameters, or to keep all
261
+ # the default parameter values, pass an empty Hash as a request object (see above).
262
+ #
263
+ # @param resource [::String]
264
+ # REQUIRED: The resource for which the policy is being requested.
265
+ # See the operation documentation for the appropriate value for this field.
266
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
267
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
268
+ # `GetIamPolicy`.
269
+ # @yield [result, response] Access the result along with the Faraday response object
270
+ # @yieldparam result [::Google::Iam::V1::Policy]
271
+ # @yieldparam response [::Faraday::Response]
272
+ #
273
+ # @return [::Google::Iam::V1::Policy]
274
+ #
275
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
276
+ def get_iam_policy request, options = nil
277
+ raise ::ArgumentError, "request must be provided" if request.nil?
278
+
279
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
280
+
281
+ # Converts hash and nil to an options object
282
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
283
+
284
+ # Customize the options with defaults
285
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
286
+
287
+ # Set x-goog-api-client and x-goog-user-project headers
288
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
289
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
290
+ gapic_version: ::Google::Iam::V1::VERSION,
291
+ transports_version_send: [:rest]
292
+
293
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
294
+
295
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
296
+ metadata: call_metadata,
297
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
298
+
299
+ options.apply_defaults timeout: @config.timeout,
300
+ metadata: @config.metadata,
301
+ retry_policy: @config.retry_policy
302
+
303
+ bindings_override = @config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"]
304
+
305
+ @iam_policy_stub.get_iam_policy request, options, bindings_override: bindings_override do |result, response|
306
+ yield result, response if block_given?
307
+ return result
308
+ end
309
+ rescue ::Faraday::Error => e
310
+ begin
311
+ raise ::Gapic::Rest::Error.wrap_faraday_error e
312
+ rescue ::Gapic::Rest::Error => gapic_error
313
+ raise ::Google::Cloud::Error.from_error gapic_error
314
+ end
315
+ end
316
+
317
+ ##
318
+ # Returns permissions that a caller has on the specified resource.
319
+ # If the resource does not exist, this will return an empty set of
320
+ # permissions, not a `NOT_FOUND` error.
321
+ #
322
+ # Note: This operation is designed to be used for building permission-aware
323
+ # UIs and command-line tools, not for authorization checking. This operation
324
+ # may "fail open" without warning.
325
+ #
326
+ # @overload test_iam_permissions(request, options = nil)
327
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
328
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
329
+ #
330
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
331
+ # A request object representing the call parameters. Required. To specify no
332
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
333
+ # @param options [::Gapic::CallOptions, ::Hash]
334
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
335
+ #
336
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
337
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
338
+ # least one keyword argument is required. To specify no parameters, or to keep all
339
+ # the default parameter values, pass an empty Hash as a request object (see above).
340
+ #
341
+ # @param resource [::String]
342
+ # REQUIRED: The resource for which the policy detail is being requested.
343
+ # See the operation documentation for the appropriate value for this field.
344
+ # @param permissions [::Array<::String>]
345
+ # The set of permissions to check for the `resource`. Permissions with
346
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
347
+ # information see
348
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
349
+ # @yield [result, response] Access the result along with the Faraday response object
350
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
351
+ # @yieldparam response [::Faraday::Response]
352
+ #
353
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
354
+ #
355
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
356
+ def test_iam_permissions request, options = nil
357
+ raise ::ArgumentError, "request must be provided" if request.nil?
358
+
359
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
360
+
361
+ # Converts hash and nil to an options object
362
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
363
+
364
+ # Customize the options with defaults
365
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
366
+
367
+ # Set x-goog-api-client and x-goog-user-project headers
368
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
369
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
370
+ gapic_version: ::Google::Iam::V1::VERSION,
371
+ transports_version_send: [:rest]
372
+
373
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
374
+
375
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
376
+ metadata: call_metadata,
377
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
378
+
379
+ options.apply_defaults timeout: @config.timeout,
380
+ metadata: @config.metadata,
381
+ retry_policy: @config.retry_policy
382
+
383
+ bindings_override = @config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"]
384
+
385
+ @iam_policy_stub.test_iam_permissions request, options, bindings_override: bindings_override do |result, response|
386
+ yield result, response if block_given?
387
+ return result
388
+ end
389
+ rescue ::Faraday::Error => e
390
+ begin
391
+ raise ::Gapic::Rest::Error.wrap_faraday_error e
392
+ rescue ::Gapic::Rest::Error => gapic_error
393
+ raise ::Google::Cloud::Error.from_error gapic_error
394
+ end
395
+ end
396
+
397
+ ##
398
+ # Configuration class for the IAMPolicy REST API.
399
+ #
400
+ # This class represents the configuration for IAMPolicy REST,
401
+ # providing control over timeouts, retry behavior, logging, transport
402
+ # parameters, and other low-level controls. Certain parameters can also be
403
+ # applied individually to specific RPCs. See
404
+ # {::Google::Iam::V1::IAMPolicy::Rest::Client::Configuration::Rpcs}
405
+ # for a list of RPCs that can be configured independently.
406
+ #
407
+ # Configuration can be applied globally to all clients, or to a single client
408
+ # on construction.
409
+ #
410
+ # @example
411
+ #
412
+ # # Modify the global config, setting the timeout for
413
+ # # set_iam_policy to 20 seconds,
414
+ # # and all remaining timeouts to 10 seconds.
415
+ # ::Google::Iam::V1::IAMPolicy::Rest::Client.configure do |config|
416
+ # config.timeout = 10.0
417
+ # config.rpcs.set_iam_policy.timeout = 20.0
418
+ # end
419
+ #
420
+ # # Apply the above configuration only to a new client.
421
+ # client = ::Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
422
+ # config.timeout = 10.0
423
+ # config.rpcs.set_iam_policy.timeout = 20.0
424
+ # end
425
+ #
426
+ # @!attribute [rw] endpoint
427
+ # The hostname or hostname:port of the service endpoint.
428
+ # Defaults to `"iam-meta-api.googleapis.com"`.
429
+ # @return [::String]
430
+ # @!attribute [rw] credentials
431
+ # Credentials to send with calls. You may provide any of the following types:
432
+ # * (`String`) The path to a service account key file in JSON format
433
+ # * (`Hash`) A service account key as a Hash
434
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
435
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
436
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
437
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
438
+ # * (`nil`) indicating no credentials
439
+ # @return [::Object]
440
+ # @!attribute [rw] scope
441
+ # The OAuth scopes
442
+ # @return [::Array<::String>]
443
+ # @!attribute [rw] lib_name
444
+ # The library name as recorded in instrumentation and logging
445
+ # @return [::String]
446
+ # @!attribute [rw] lib_version
447
+ # The library version as recorded in instrumentation and logging
448
+ # @return [::String]
449
+ # @!attribute [rw] timeout
450
+ # The call timeout in seconds.
451
+ # @return [::Numeric]
452
+ # @!attribute [rw] metadata
453
+ # Additional headers to be sent with the call.
454
+ # @return [::Hash{::Symbol=>::String}]
455
+ # @!attribute [rw] retry_policy
456
+ # The retry policy. The value is a hash with the following keys:
457
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
458
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
459
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
460
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
461
+ # trigger a retry.
462
+ # @return [::Hash]
463
+ # @!attribute [rw] quota_project
464
+ # A separate project against which to charge quota.
465
+ # @return [::String]
466
+ #
467
+ class Configuration
468
+ extend ::Gapic::Config
469
+
470
+ config_attr :endpoint, "iam-meta-api.googleapis.com", ::String
471
+ config_attr :credentials, nil do |value|
472
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
473
+ allowed.any? { |klass| klass === value }
474
+ end
475
+ config_attr :scope, nil, ::String, ::Array, nil
476
+ config_attr :lib_name, nil, ::String, nil
477
+ config_attr :lib_version, nil, ::String, nil
478
+ config_attr :timeout, nil, ::Numeric, nil
479
+ config_attr :metadata, nil, ::Hash, nil
480
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
481
+ config_attr :quota_project, nil, ::String, nil
482
+
483
+ # @private
484
+ # Overrides for http bindings for the RPCs of this service
485
+ # are only used when this service is used as mixin, and only
486
+ # by the host service.
487
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
488
+ config_attr :bindings_override, {}, ::Hash, nil
489
+
490
+ # @private
491
+ def initialize parent_config = nil
492
+ @parent_config = parent_config unless parent_config.nil?
493
+
494
+ yield self if block_given?
495
+ end
496
+
497
+ ##
498
+ # Configurations for individual RPCs
499
+ # @return [Rpcs]
500
+ #
501
+ def rpcs
502
+ @rpcs ||= begin
503
+ parent_rpcs = nil
504
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
505
+ Rpcs.new parent_rpcs
506
+ end
507
+ end
508
+
509
+ ##
510
+ # Configuration RPC class for the IAMPolicy API.
511
+ #
512
+ # Includes fields providing the configuration for each RPC in this service.
513
+ # Each configuration object is of type `Gapic::Config::Method` and includes
514
+ # the following configuration fields:
515
+ #
516
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
517
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
518
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
519
+ # include the following keys:
520
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
521
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
522
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
523
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
524
+ # trigger a retry.
525
+ #
526
+ class Rpcs
527
+ ##
528
+ # RPC-specific configuration for `set_iam_policy`
529
+ # @return [::Gapic::Config::Method]
530
+ #
531
+ attr_reader :set_iam_policy
532
+ ##
533
+ # RPC-specific configuration for `get_iam_policy`
534
+ # @return [::Gapic::Config::Method]
535
+ #
536
+ attr_reader :get_iam_policy
537
+ ##
538
+ # RPC-specific configuration for `test_iam_permissions`
539
+ # @return [::Gapic::Config::Method]
540
+ #
541
+ attr_reader :test_iam_permissions
542
+
543
+ # @private
544
+ def initialize parent_rpcs = nil
545
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
546
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
547
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
548
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
549
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
550
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
551
+
552
+ yield self if block_given?
553
+ end
554
+ end
555
+ end
556
+ end
557
+ end
558
+ end
559
+ end
560
+ end
561
+ end