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