google-iam-v3beta 0.a → 0.1.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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/iam/v3beta/operation_metadata_pb.rb +44 -0
  6. data/lib/google/iam/v3beta/policy_binding_resources_pb.rb +50 -0
  7. data/lib/google/iam/v3beta/policy_bindings/client.rb +1130 -0
  8. data/lib/google/iam/v3beta/policy_bindings/credentials.rb +45 -0
  9. data/lib/google/iam/v3beta/policy_bindings/operations.rb +811 -0
  10. data/lib/google/iam/v3beta/policy_bindings/paths.rb +140 -0
  11. data/lib/google/iam/v3beta/policy_bindings/rest/client.rb +1062 -0
  12. data/lib/google/iam/v3beta/policy_bindings/rest/operations.rb +926 -0
  13. data/lib/google/iam/v3beta/policy_bindings/rest/service_stub.rb +535 -0
  14. data/lib/google/iam/v3beta/policy_bindings/rest.rb +52 -0
  15. data/lib/google/iam/v3beta/policy_bindings.rb +55 -0
  16. data/lib/google/iam/v3beta/policy_bindings_service_pb.rb +59 -0
  17. data/lib/google/iam/v3beta/policy_bindings_service_services_pb.rb +63 -0
  18. data/lib/google/iam/v3beta/principal_access_boundary_policies/client.rb +1083 -0
  19. data/lib/google/iam/v3beta/principal_access_boundary_policies/credentials.rb +45 -0
  20. data/lib/google/iam/v3beta/principal_access_boundary_policies/operations.rb +811 -0
  21. data/lib/google/iam/v3beta/principal_access_boundary_policies/paths.rb +67 -0
  22. data/lib/google/iam/v3beta/principal_access_boundary_policies/rest/client.rb +1015 -0
  23. data/lib/google/iam/v3beta/principal_access_boundary_policies/rest/operations.rb +926 -0
  24. data/lib/google/iam/v3beta/principal_access_boundary_policies/rest/service_stub.rb +447 -0
  25. data/lib/google/iam/v3beta/principal_access_boundary_policies/rest.rb +52 -0
  26. data/lib/google/iam/v3beta/principal_access_boundary_policies.rb +55 -0
  27. data/lib/google/iam/v3beta/principal_access_boundary_policies_service_pb.rb +61 -0
  28. data/lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb +56 -0
  29. data/lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb +49 -0
  30. data/lib/google/iam/v3beta/rest.rb +36 -0
  31. data/lib/google/iam/v3beta/version.rb +7 -2
  32. data/lib/google/iam/v3beta.rb +44 -0
  33. data/lib/google-iam-v3beta.rb +21 -0
  34. data/proto_docs/README.md +4 -0
  35. data/proto_docs/google/api/client.rb +473 -0
  36. data/proto_docs/google/api/field_behavior.rb +85 -0
  37. data/proto_docs/google/api/field_info.rb +88 -0
  38. data/proto_docs/google/api/launch_stage.rb +71 -0
  39. data/proto_docs/google/api/resource.rb +227 -0
  40. data/proto_docs/google/iam/v3beta/operation_metadata.rb +55 -0
  41. data/proto_docs/google/iam/v3beta/policy_binding_resources.rb +171 -0
  42. data/proto_docs/google/iam/v3beta/policy_bindings_service.rb +232 -0
  43. data/proto_docs/google/iam/v3beta/principal_access_boundary_policies_service.rb +191 -0
  44. data/proto_docs/google/iam/v3beta/principal_access_boundary_policy_resources.rb +127 -0
  45. data/proto_docs/google/longrunning/operations.rb +173 -0
  46. data/proto_docs/google/protobuf/any.rb +145 -0
  47. data/proto_docs/google/protobuf/duration.rb +98 -0
  48. data/proto_docs/google/protobuf/empty.rb +34 -0
  49. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  50. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  51. data/proto_docs/google/rpc/status.rb +48 -0
  52. data/proto_docs/google/type/expr.rb +75 -0
  53. metadata +106 -9
@@ -0,0 +1,1062 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/v3beta/policy_bindings_service_pb"
21
+ require "google/iam/v3beta/policy_bindings/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Iam
26
+ module V3beta
27
+ module PolicyBindings
28
+ module Rest
29
+ ##
30
+ # REST client for the PolicyBindings service.
31
+ #
32
+ # An interface for managing Identity and Access Management (IAM) policy
33
+ # bindings.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "iam.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :policy_bindings_stub
46
+
47
+ ##
48
+ # Configure the PolicyBindings Client class.
49
+ #
50
+ # See {::Google::Iam::V3beta::PolicyBindings::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all PolicyBindings clients
56
+ # ::Google::Iam::V3beta::PolicyBindings::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Iam", "V3beta"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.rpcs.create_policy_binding.timeout = 30.0
77
+
78
+ default_config.rpcs.get_policy_binding.timeout = 60.0
79
+ default_config.rpcs.get_policy_binding.retry_policy = {
80
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
81
+ }
82
+
83
+ default_config.rpcs.update_policy_binding.timeout = 30.0
84
+
85
+ default_config.rpcs.delete_policy_binding.timeout = 30.0
86
+
87
+ default_config.rpcs.list_policy_bindings.timeout = 60.0
88
+ default_config.rpcs.list_policy_bindings.retry_policy = {
89
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
90
+ }
91
+
92
+ default_config.rpcs.search_target_policy_bindings.timeout = 60.0
93
+ default_config.rpcs.search_target_policy_bindings.retry_policy = {
94
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
95
+ }
96
+
97
+ default_config
98
+ end
99
+ yield @configure if block_given?
100
+ @configure
101
+ end
102
+
103
+ ##
104
+ # Configure the PolicyBindings Client instance.
105
+ #
106
+ # The configuration is set to the derived mode, meaning that values can be changed,
107
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
108
+ # should be made on {Client.configure}.
109
+ #
110
+ # See {::Google::Iam::V3beta::PolicyBindings::Rest::Client::Configuration}
111
+ # for a description of the configuration fields.
112
+ #
113
+ # @yield [config] Configure the Client client.
114
+ # @yieldparam config [Client::Configuration]
115
+ #
116
+ # @return [Client::Configuration]
117
+ #
118
+ def configure
119
+ yield @config if block_given?
120
+ @config
121
+ end
122
+
123
+ ##
124
+ # The effective universe domain
125
+ #
126
+ # @return [String]
127
+ #
128
+ def universe_domain
129
+ @policy_bindings_stub.universe_domain
130
+ end
131
+
132
+ ##
133
+ # Create a new PolicyBindings REST client object.
134
+ #
135
+ # @example
136
+ #
137
+ # # Create a client using the default configuration
138
+ # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new
139
+ #
140
+ # # Create a client using a custom configuration
141
+ # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config|
142
+ # config.timeout = 10.0
143
+ # end
144
+ #
145
+ # @yield [config] Configure the PolicyBindings client.
146
+ # @yieldparam config [Client::Configuration]
147
+ #
148
+ def initialize
149
+ # Create the configuration object
150
+ @config = Configuration.new Client.configure
151
+
152
+ # Yield the configuration if needed
153
+ yield @config if block_given?
154
+
155
+ # Create credentials
156
+ credentials = @config.credentials
157
+ # Use self-signed JWT if the endpoint is unchanged from default,
158
+ # but only if the default endpoint does not have a region prefix.
159
+ enable_self_signed_jwt = @config.endpoint.nil? ||
160
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
161
+ !@config.endpoint.split(".").first.include?("-"))
162
+ credentials ||= Credentials.default scope: @config.scope,
163
+ enable_self_signed_jwt: enable_self_signed_jwt
164
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
165
+ credentials = Credentials.new credentials, scope: @config.scope
166
+ end
167
+
168
+ @quota_project_id = @config.quota_project
169
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
170
+
171
+ @operations_client = ::Google::Iam::V3beta::PolicyBindings::Rest::Operations.new do |config|
172
+ config.credentials = credentials
173
+ config.quota_project = @quota_project_id
174
+ config.endpoint = @config.endpoint
175
+ config.universe_domain = @config.universe_domain
176
+ end
177
+
178
+ @policy_bindings_stub = ::Google::Iam::V3beta::PolicyBindings::Rest::ServiceStub.new(
179
+ endpoint: @config.endpoint,
180
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
181
+ universe_domain: @config.universe_domain,
182
+ credentials: credentials,
183
+ logger: @config.logger
184
+ )
185
+
186
+ @policy_bindings_stub.logger(stub: true)&.info do |entry|
187
+ entry.set_system_name
188
+ entry.set_service
189
+ entry.message = "Created client for #{entry.service}"
190
+ entry.set_credentials_fields credentials
191
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
192
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
193
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
194
+ end
195
+
196
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
197
+ config.credentials = credentials
198
+ config.quota_project = @quota_project_id
199
+ config.endpoint = @policy_bindings_stub.endpoint
200
+ config.universe_domain = @policy_bindings_stub.universe_domain
201
+ config.logger = @policy_bindings_stub.logger if config.respond_to? :logger=
202
+ end
203
+ end
204
+
205
+ ##
206
+ # Get the associated client for long-running operations.
207
+ #
208
+ # @return [::Google::Iam::V3beta::PolicyBindings::Rest::Operations]
209
+ #
210
+ attr_reader :operations_client
211
+
212
+ ##
213
+ # Get the associated client for mix-in of the Locations.
214
+ #
215
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
216
+ #
217
+ attr_reader :location_client
218
+
219
+ ##
220
+ # The logger used for request/response debug logging.
221
+ #
222
+ # @return [Logger]
223
+ #
224
+ def logger
225
+ @policy_bindings_stub.logger
226
+ end
227
+
228
+ # Service calls
229
+
230
+ ##
231
+ # Creates a policy binding and returns a long-running operation.
232
+ # Callers will need the IAM permissions on both the policy and target.
233
+ # Once the binding is created, the policy is applied to the target.
234
+ #
235
+ # @overload create_policy_binding(request, options = nil)
236
+ # Pass arguments to `create_policy_binding` via a request object, either of type
237
+ # {::Google::Iam::V3beta::CreatePolicyBindingRequest} or an equivalent Hash.
238
+ #
239
+ # @param request [::Google::Iam::V3beta::CreatePolicyBindingRequest, ::Hash]
240
+ # A request object representing the call parameters. Required. To specify no
241
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
242
+ # @param options [::Gapic::CallOptions, ::Hash]
243
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
244
+ #
245
+ # @overload create_policy_binding(parent: nil, policy_binding_id: nil, policy_binding: nil, validate_only: nil)
246
+ # Pass arguments to `create_policy_binding` via keyword arguments. Note that at
247
+ # least one keyword argument is required. To specify no parameters, or to keep all
248
+ # the default parameter values, pass an empty Hash as a request object (see above).
249
+ #
250
+ # @param parent [::String]
251
+ # Required. The parent resource where this policy binding will be created.
252
+ # The binding parent is the closest Resource Manager resource (project,
253
+ # folder or organization) to the binding target.
254
+ #
255
+ # Format:
256
+ #
257
+ # * `projects/{project_id}/locations/{location}`
258
+ # * `projects/{project_number}/locations/{location}`
259
+ # * `folders/{folder_id}/locations/{location}`
260
+ # * `organizations/{organization_id}/locations/{location}`
261
+ # @param policy_binding_id [::String]
262
+ # Required. The ID to use for the policy binding, which will become the final
263
+ # component of the policy binding's resource name.
264
+ #
265
+ # This value must start with a lowercase letter followed by up to 62
266
+ # lowercase letters, numbers, hyphens, or dots. Pattern,
267
+ # /[a-z][a-z0-9-\.]\\{2,62}/.
268
+ # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash]
269
+ # Required. The policy binding to create.
270
+ # @param validate_only [::Boolean]
271
+ # Optional. If set, validate the request and preview the creation, but do not
272
+ # actually post it.
273
+ # @yield [result, operation] Access the result along with the TransportOperation object
274
+ # @yieldparam result [::Gapic::Operation]
275
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
276
+ #
277
+ # @return [::Gapic::Operation]
278
+ #
279
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
280
+ #
281
+ # @example Basic example
282
+ # require "google/iam/v3beta"
283
+ #
284
+ # # Create a client object. The client can be reused for multiple calls.
285
+ # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new
286
+ #
287
+ # # Create a request. To set request fields, pass in keyword arguments.
288
+ # request = Google::Iam::V3beta::CreatePolicyBindingRequest.new
289
+ #
290
+ # # Call the create_policy_binding method.
291
+ # result = client.create_policy_binding request
292
+ #
293
+ # # The returned object is of type Gapic::Operation. You can use it to
294
+ # # check the status of an operation, cancel it, or wait for results.
295
+ # # Here is how to wait for a response.
296
+ # result.wait_until_done! timeout: 60
297
+ # if result.response?
298
+ # p result.response
299
+ # else
300
+ # puts "No response received."
301
+ # end
302
+ #
303
+ def create_policy_binding request, options = nil
304
+ raise ::ArgumentError, "request must be provided" if request.nil?
305
+
306
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePolicyBindingRequest
307
+
308
+ # Converts hash and nil to an options object
309
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
310
+
311
+ # Customize the options with defaults
312
+ call_metadata = @config.rpcs.create_policy_binding.metadata.to_h
313
+
314
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
315
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
316
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
317
+ gapic_version: ::Google::Iam::V3beta::VERSION,
318
+ transports_version_send: [:rest]
319
+
320
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
321
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
322
+
323
+ options.apply_defaults timeout: @config.rpcs.create_policy_binding.timeout,
324
+ metadata: call_metadata,
325
+ retry_policy: @config.rpcs.create_policy_binding.retry_policy
326
+
327
+ options.apply_defaults timeout: @config.timeout,
328
+ metadata: @config.metadata,
329
+ retry_policy: @config.retry_policy
330
+
331
+ @policy_bindings_stub.create_policy_binding request, options do |result, operation|
332
+ result = ::Gapic::Operation.new result, @operations_client, options: options
333
+ yield result, operation if block_given?
334
+ throw :response, result
335
+ end
336
+ rescue ::Gapic::Rest::Error => e
337
+ raise ::Google::Cloud::Error.from_error(e)
338
+ end
339
+
340
+ ##
341
+ # Gets a policy binding.
342
+ #
343
+ # @overload get_policy_binding(request, options = nil)
344
+ # Pass arguments to `get_policy_binding` via a request object, either of type
345
+ # {::Google::Iam::V3beta::GetPolicyBindingRequest} or an equivalent Hash.
346
+ #
347
+ # @param request [::Google::Iam::V3beta::GetPolicyBindingRequest, ::Hash]
348
+ # A request object representing the call parameters. Required. To specify no
349
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
350
+ # @param options [::Gapic::CallOptions, ::Hash]
351
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
352
+ #
353
+ # @overload get_policy_binding(name: nil)
354
+ # Pass arguments to `get_policy_binding` via keyword arguments. Note that at
355
+ # least one keyword argument is required. To specify no parameters, or to keep all
356
+ # the default parameter values, pass an empty Hash as a request object (see above).
357
+ #
358
+ # @param name [::String]
359
+ # Required. The name of the policy binding to retrieve.
360
+ #
361
+ # Format:
362
+ #
363
+ # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
364
+ # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
365
+ # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
366
+ # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
367
+ # @yield [result, operation] Access the result along with the TransportOperation object
368
+ # @yieldparam result [::Google::Iam::V3beta::PolicyBinding]
369
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
370
+ #
371
+ # @return [::Google::Iam::V3beta::PolicyBinding]
372
+ #
373
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
374
+ #
375
+ # @example Basic example
376
+ # require "google/iam/v3beta"
377
+ #
378
+ # # Create a client object. The client can be reused for multiple calls.
379
+ # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new
380
+ #
381
+ # # Create a request. To set request fields, pass in keyword arguments.
382
+ # request = Google::Iam::V3beta::GetPolicyBindingRequest.new
383
+ #
384
+ # # Call the get_policy_binding method.
385
+ # result = client.get_policy_binding request
386
+ #
387
+ # # The returned object is of type Google::Iam::V3beta::PolicyBinding.
388
+ # p result
389
+ #
390
+ def get_policy_binding request, options = nil
391
+ raise ::ArgumentError, "request must be provided" if request.nil?
392
+
393
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPolicyBindingRequest
394
+
395
+ # Converts hash and nil to an options object
396
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
397
+
398
+ # Customize the options with defaults
399
+ call_metadata = @config.rpcs.get_policy_binding.metadata.to_h
400
+
401
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
402
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
403
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
404
+ gapic_version: ::Google::Iam::V3beta::VERSION,
405
+ transports_version_send: [:rest]
406
+
407
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
408
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
409
+
410
+ options.apply_defaults timeout: @config.rpcs.get_policy_binding.timeout,
411
+ metadata: call_metadata,
412
+ retry_policy: @config.rpcs.get_policy_binding.retry_policy
413
+
414
+ options.apply_defaults timeout: @config.timeout,
415
+ metadata: @config.metadata,
416
+ retry_policy: @config.retry_policy
417
+
418
+ @policy_bindings_stub.get_policy_binding request, options do |result, operation|
419
+ yield result, operation if block_given?
420
+ end
421
+ rescue ::Gapic::Rest::Error => e
422
+ raise ::Google::Cloud::Error.from_error(e)
423
+ end
424
+
425
+ ##
426
+ # Updates a policy binding and returns a long-running operation.
427
+ # Callers will need the IAM permissions on the policy and target in the
428
+ # binding to update, and the IAM permission to remove the existing policy
429
+ # from the binding. Target is immutable and cannot be updated. Once the
430
+ # binding is updated, the new policy is applied to the target.
431
+ #
432
+ # @overload update_policy_binding(request, options = nil)
433
+ # Pass arguments to `update_policy_binding` via a request object, either of type
434
+ # {::Google::Iam::V3beta::UpdatePolicyBindingRequest} or an equivalent Hash.
435
+ #
436
+ # @param request [::Google::Iam::V3beta::UpdatePolicyBindingRequest, ::Hash]
437
+ # A request object representing the call parameters. Required. To specify no
438
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
439
+ # @param options [::Gapic::CallOptions, ::Hash]
440
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
441
+ #
442
+ # @overload update_policy_binding(policy_binding: nil, validate_only: nil, update_mask: nil)
443
+ # Pass arguments to `update_policy_binding` via keyword arguments. Note that at
444
+ # least one keyword argument is required. To specify no parameters, or to keep all
445
+ # the default parameter values, pass an empty Hash as a request object (see above).
446
+ #
447
+ # @param policy_binding [::Google::Iam::V3beta::PolicyBinding, ::Hash]
448
+ # Required. The policy binding to update.
449
+ #
450
+ # The policy binding's `name` field is used to identify the policy binding to
451
+ # update.
452
+ # @param validate_only [::Boolean]
453
+ # Optional. If set, validate the request and preview the update, but do not
454
+ # actually post it.
455
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
456
+ # Optional. The list of fields to update
457
+ # @yield [result, operation] Access the result along with the TransportOperation object
458
+ # @yieldparam result [::Gapic::Operation]
459
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
460
+ #
461
+ # @return [::Gapic::Operation]
462
+ #
463
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
464
+ #
465
+ # @example Basic example
466
+ # require "google/iam/v3beta"
467
+ #
468
+ # # Create a client object. The client can be reused for multiple calls.
469
+ # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new
470
+ #
471
+ # # Create a request. To set request fields, pass in keyword arguments.
472
+ # request = Google::Iam::V3beta::UpdatePolicyBindingRequest.new
473
+ #
474
+ # # Call the update_policy_binding method.
475
+ # result = client.update_policy_binding request
476
+ #
477
+ # # The returned object is of type Gapic::Operation. You can use it to
478
+ # # check the status of an operation, cancel it, or wait for results.
479
+ # # Here is how to wait for a response.
480
+ # result.wait_until_done! timeout: 60
481
+ # if result.response?
482
+ # p result.response
483
+ # else
484
+ # puts "No response received."
485
+ # end
486
+ #
487
+ def update_policy_binding request, options = nil
488
+ raise ::ArgumentError, "request must be provided" if request.nil?
489
+
490
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePolicyBindingRequest
491
+
492
+ # Converts hash and nil to an options object
493
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
494
+
495
+ # Customize the options with defaults
496
+ call_metadata = @config.rpcs.update_policy_binding.metadata.to_h
497
+
498
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
499
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
500
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
501
+ gapic_version: ::Google::Iam::V3beta::VERSION,
502
+ transports_version_send: [:rest]
503
+
504
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
505
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
506
+
507
+ options.apply_defaults timeout: @config.rpcs.update_policy_binding.timeout,
508
+ metadata: call_metadata,
509
+ retry_policy: @config.rpcs.update_policy_binding.retry_policy
510
+
511
+ options.apply_defaults timeout: @config.timeout,
512
+ metadata: @config.metadata,
513
+ retry_policy: @config.retry_policy
514
+
515
+ @policy_bindings_stub.update_policy_binding request, options do |result, operation|
516
+ result = ::Gapic::Operation.new result, @operations_client, options: options
517
+ yield result, operation if block_given?
518
+ throw :response, result
519
+ end
520
+ rescue ::Gapic::Rest::Error => e
521
+ raise ::Google::Cloud::Error.from_error(e)
522
+ end
523
+
524
+ ##
525
+ # Deletes a policy binding and returns a long-running operation.
526
+ # Callers will need the IAM permissions on both the policy and target.
527
+ # Once the binding is deleted, the policy no longer applies to the target.
528
+ #
529
+ # @overload delete_policy_binding(request, options = nil)
530
+ # Pass arguments to `delete_policy_binding` via a request object, either of type
531
+ # {::Google::Iam::V3beta::DeletePolicyBindingRequest} or an equivalent Hash.
532
+ #
533
+ # @param request [::Google::Iam::V3beta::DeletePolicyBindingRequest, ::Hash]
534
+ # A request object representing the call parameters. Required. To specify no
535
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
536
+ # @param options [::Gapic::CallOptions, ::Hash]
537
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
538
+ #
539
+ # @overload delete_policy_binding(name: nil, etag: nil, validate_only: nil)
540
+ # Pass arguments to `delete_policy_binding` via keyword arguments. Note that at
541
+ # least one keyword argument is required. To specify no parameters, or to keep all
542
+ # the default parameter values, pass an empty Hash as a request object (see above).
543
+ #
544
+ # @param name [::String]
545
+ # Required. The name of the policy binding to delete.
546
+ #
547
+ # Format:
548
+ #
549
+ # * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
550
+ # * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
551
+ # * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
552
+ # * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
553
+ # @param etag [::String]
554
+ # Optional. The etag of the policy binding.
555
+ # If this is provided, it must match the server's etag.
556
+ # @param validate_only [::Boolean]
557
+ # Optional. If set, validate the request and preview the deletion, but do not
558
+ # actually post it.
559
+ # @yield [result, operation] Access the result along with the TransportOperation object
560
+ # @yieldparam result [::Gapic::Operation]
561
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
562
+ #
563
+ # @return [::Gapic::Operation]
564
+ #
565
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
566
+ #
567
+ # @example Basic example
568
+ # require "google/iam/v3beta"
569
+ #
570
+ # # Create a client object. The client can be reused for multiple calls.
571
+ # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new
572
+ #
573
+ # # Create a request. To set request fields, pass in keyword arguments.
574
+ # request = Google::Iam::V3beta::DeletePolicyBindingRequest.new
575
+ #
576
+ # # Call the delete_policy_binding method.
577
+ # result = client.delete_policy_binding request
578
+ #
579
+ # # The returned object is of type Gapic::Operation. You can use it to
580
+ # # check the status of an operation, cancel it, or wait for results.
581
+ # # Here is how to wait for a response.
582
+ # result.wait_until_done! timeout: 60
583
+ # if result.response?
584
+ # p result.response
585
+ # else
586
+ # puts "No response received."
587
+ # end
588
+ #
589
+ def delete_policy_binding request, options = nil
590
+ raise ::ArgumentError, "request must be provided" if request.nil?
591
+
592
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePolicyBindingRequest
593
+
594
+ # Converts hash and nil to an options object
595
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
596
+
597
+ # Customize the options with defaults
598
+ call_metadata = @config.rpcs.delete_policy_binding.metadata.to_h
599
+
600
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
601
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
602
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
603
+ gapic_version: ::Google::Iam::V3beta::VERSION,
604
+ transports_version_send: [:rest]
605
+
606
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
607
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
608
+
609
+ options.apply_defaults timeout: @config.rpcs.delete_policy_binding.timeout,
610
+ metadata: call_metadata,
611
+ retry_policy: @config.rpcs.delete_policy_binding.retry_policy
612
+
613
+ options.apply_defaults timeout: @config.timeout,
614
+ metadata: @config.metadata,
615
+ retry_policy: @config.retry_policy
616
+
617
+ @policy_bindings_stub.delete_policy_binding request, options do |result, operation|
618
+ result = ::Gapic::Operation.new result, @operations_client, options: options
619
+ yield result, operation if block_given?
620
+ throw :response, result
621
+ end
622
+ rescue ::Gapic::Rest::Error => e
623
+ raise ::Google::Cloud::Error.from_error(e)
624
+ end
625
+
626
+ ##
627
+ # Lists policy bindings.
628
+ #
629
+ # @overload list_policy_bindings(request, options = nil)
630
+ # Pass arguments to `list_policy_bindings` via a request object, either of type
631
+ # {::Google::Iam::V3beta::ListPolicyBindingsRequest} or an equivalent Hash.
632
+ #
633
+ # @param request [::Google::Iam::V3beta::ListPolicyBindingsRequest, ::Hash]
634
+ # A request object representing the call parameters. Required. To specify no
635
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
636
+ # @param options [::Gapic::CallOptions, ::Hash]
637
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
638
+ #
639
+ # @overload list_policy_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil)
640
+ # Pass arguments to `list_policy_bindings` via keyword arguments. Note that at
641
+ # least one keyword argument is required. To specify no parameters, or to keep all
642
+ # the default parameter values, pass an empty Hash as a request object (see above).
643
+ #
644
+ # @param parent [::String]
645
+ # Required. The parent resource, which owns the collection of policy
646
+ # bindings.
647
+ #
648
+ # Format:
649
+ #
650
+ # * `projects/{project_id}/locations/{location}`
651
+ # * `projects/{project_number}/locations/{location}`
652
+ # * `folders/{folder_id}/locations/{location}`
653
+ # * `organizations/{organization_id}/locations/{location}`
654
+ # @param page_size [::Integer]
655
+ # Optional. The maximum number of policy bindings to return. The service may
656
+ # return fewer than this value.
657
+ #
658
+ # If unspecified, at most 50 policy bindings will be returned.
659
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
660
+ # @param page_token [::String]
661
+ # Optional. A page token, received from a previous `ListPolicyBindings` call.
662
+ # Provide this to retrieve the subsequent page.
663
+ #
664
+ # When paginating, all other parameters provided to `ListPolicyBindings` must
665
+ # match the call that provided the page token.
666
+ # @param filter [::String]
667
+ # Optional. An expression for filtering the results of the request. Filter
668
+ # rules are case insensitive. Some eligible fields for filtering are:
669
+ #
670
+ # + `target`
671
+ # + `policy`
672
+ #
673
+ # Some examples of filter queries:
674
+ #
675
+ # * `target:ex*`: The binding target's name starts with "ex".
676
+ # * `target:example`: The binding target's name is `example`.
677
+ # * `policy:example`: The binding policy's name is `example`.
678
+ # @yield [result, operation] Access the result along with the TransportOperation object
679
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>]
680
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
681
+ #
682
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>]
683
+ #
684
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
685
+ #
686
+ # @example Basic example
687
+ # require "google/iam/v3beta"
688
+ #
689
+ # # Create a client object. The client can be reused for multiple calls.
690
+ # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new
691
+ #
692
+ # # Create a request. To set request fields, pass in keyword arguments.
693
+ # request = Google::Iam::V3beta::ListPolicyBindingsRequest.new
694
+ #
695
+ # # Call the list_policy_bindings method.
696
+ # result = client.list_policy_bindings request
697
+ #
698
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
699
+ # # over elements, and API calls will be issued to fetch pages as needed.
700
+ # result.each do |item|
701
+ # # Each element is of type ::Google::Iam::V3beta::PolicyBinding.
702
+ # p item
703
+ # end
704
+ #
705
+ def list_policy_bindings request, options = nil
706
+ raise ::ArgumentError, "request must be provided" if request.nil?
707
+
708
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPolicyBindingsRequest
709
+
710
+ # Converts hash and nil to an options object
711
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
712
+
713
+ # Customize the options with defaults
714
+ call_metadata = @config.rpcs.list_policy_bindings.metadata.to_h
715
+
716
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
717
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
718
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
719
+ gapic_version: ::Google::Iam::V3beta::VERSION,
720
+ transports_version_send: [:rest]
721
+
722
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
723
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
724
+
725
+ options.apply_defaults timeout: @config.rpcs.list_policy_bindings.timeout,
726
+ metadata: call_metadata,
727
+ retry_policy: @config.rpcs.list_policy_bindings.retry_policy
728
+
729
+ options.apply_defaults timeout: @config.timeout,
730
+ metadata: @config.metadata,
731
+ retry_policy: @config.retry_policy
732
+
733
+ @policy_bindings_stub.list_policy_bindings request, options do |result, operation|
734
+ result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :list_policy_bindings, "policy_bindings", request, result, options
735
+ yield result, operation if block_given?
736
+ throw :response, result
737
+ end
738
+ rescue ::Gapic::Rest::Error => e
739
+ raise ::Google::Cloud::Error.from_error(e)
740
+ end
741
+
742
+ ##
743
+ # Search policy bindings by target. Returns all policy binding objects bound
744
+ # directly to target.
745
+ #
746
+ # @overload search_target_policy_bindings(request, options = nil)
747
+ # Pass arguments to `search_target_policy_bindings` via a request object, either of type
748
+ # {::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest} or an equivalent Hash.
749
+ #
750
+ # @param request [::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest, ::Hash]
751
+ # A request object representing the call parameters. Required. To specify no
752
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
753
+ # @param options [::Gapic::CallOptions, ::Hash]
754
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
755
+ #
756
+ # @overload search_target_policy_bindings(target: nil, page_size: nil, page_token: nil, parent: nil)
757
+ # Pass arguments to `search_target_policy_bindings` via keyword arguments. Note that at
758
+ # least one keyword argument is required. To specify no parameters, or to keep all
759
+ # the default parameter values, pass an empty Hash as a request object (see above).
760
+ #
761
+ # @param target [::String]
762
+ # Required. The target resource, which is bound to the policy in the binding.
763
+ #
764
+ # Format:
765
+ #
766
+ # * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
767
+ # * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
768
+ # * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
769
+ # * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
770
+ # * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
771
+ # * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
772
+ # @param page_size [::Integer]
773
+ # Optional. The maximum number of policy bindings to return. The service may
774
+ # return fewer than this value.
775
+ #
776
+ # If unspecified, at most 50 policy bindings will be returned.
777
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
778
+ # @param page_token [::String]
779
+ # Optional. A page token, received from a previous
780
+ # `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
781
+ # subsequent page.
782
+ #
783
+ # When paginating, all other parameters provided to
784
+ # `SearchTargetPolicyBindingsRequest` must match the call that provided the
785
+ # page token.
786
+ # @param parent [::String]
787
+ # Required. The parent resource where this search will be performed. This
788
+ # should be the nearest Resource Manager resource (project, folder, or
789
+ # organization) to the target.
790
+ #
791
+ # Format:
792
+ #
793
+ # * `projects/{project_id}/locations/{location}`
794
+ # * `projects/{project_number}/locations/{location}`
795
+ # * `folders/{folder_id}/locations/{location}`
796
+ # * `organizations/{organization_id}/locations/{location}`
797
+ # @yield [result, operation] Access the result along with the TransportOperation object
798
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>]
799
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
800
+ #
801
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>]
802
+ #
803
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
804
+ #
805
+ # @example Basic example
806
+ # require "google/iam/v3beta"
807
+ #
808
+ # # Create a client object. The client can be reused for multiple calls.
809
+ # client = Google::Iam::V3beta::PolicyBindings::Rest::Client.new
810
+ #
811
+ # # Create a request. To set request fields, pass in keyword arguments.
812
+ # request = Google::Iam::V3beta::SearchTargetPolicyBindingsRequest.new
813
+ #
814
+ # # Call the search_target_policy_bindings method.
815
+ # result = client.search_target_policy_bindings request
816
+ #
817
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
818
+ # # over elements, and API calls will be issued to fetch pages as needed.
819
+ # result.each do |item|
820
+ # # Each element is of type ::Google::Iam::V3beta::PolicyBinding.
821
+ # p item
822
+ # end
823
+ #
824
+ def search_target_policy_bindings request, options = nil
825
+ raise ::ArgumentError, "request must be provided" if request.nil?
826
+
827
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchTargetPolicyBindingsRequest
828
+
829
+ # Converts hash and nil to an options object
830
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
831
+
832
+ # Customize the options with defaults
833
+ call_metadata = @config.rpcs.search_target_policy_bindings.metadata.to_h
834
+
835
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
836
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
837
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
838
+ gapic_version: ::Google::Iam::V3beta::VERSION,
839
+ transports_version_send: [:rest]
840
+
841
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
842
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
843
+
844
+ options.apply_defaults timeout: @config.rpcs.search_target_policy_bindings.timeout,
845
+ metadata: call_metadata,
846
+ retry_policy: @config.rpcs.search_target_policy_bindings.retry_policy
847
+
848
+ options.apply_defaults timeout: @config.timeout,
849
+ metadata: @config.metadata,
850
+ retry_policy: @config.retry_policy
851
+
852
+ @policy_bindings_stub.search_target_policy_bindings request, options do |result, operation|
853
+ result = ::Gapic::Rest::PagedEnumerable.new @policy_bindings_stub, :search_target_policy_bindings, "policy_bindings", request, result, options
854
+ yield result, operation if block_given?
855
+ throw :response, result
856
+ end
857
+ rescue ::Gapic::Rest::Error => e
858
+ raise ::Google::Cloud::Error.from_error(e)
859
+ end
860
+
861
+ ##
862
+ # Configuration class for the PolicyBindings REST API.
863
+ #
864
+ # This class represents the configuration for PolicyBindings REST,
865
+ # providing control over timeouts, retry behavior, logging, transport
866
+ # parameters, and other low-level controls. Certain parameters can also be
867
+ # applied individually to specific RPCs. See
868
+ # {::Google::Iam::V3beta::PolicyBindings::Rest::Client::Configuration::Rpcs}
869
+ # for a list of RPCs that can be configured independently.
870
+ #
871
+ # Configuration can be applied globally to all clients, or to a single client
872
+ # on construction.
873
+ #
874
+ # @example
875
+ #
876
+ # # Modify the global config, setting the timeout for
877
+ # # create_policy_binding to 20 seconds,
878
+ # # and all remaining timeouts to 10 seconds.
879
+ # ::Google::Iam::V3beta::PolicyBindings::Rest::Client.configure do |config|
880
+ # config.timeout = 10.0
881
+ # config.rpcs.create_policy_binding.timeout = 20.0
882
+ # end
883
+ #
884
+ # # Apply the above configuration only to a new client.
885
+ # client = ::Google::Iam::V3beta::PolicyBindings::Rest::Client.new do |config|
886
+ # config.timeout = 10.0
887
+ # config.rpcs.create_policy_binding.timeout = 20.0
888
+ # end
889
+ #
890
+ # @!attribute [rw] endpoint
891
+ # A custom service endpoint, as a hostname or hostname:port. The default is
892
+ # nil, indicating to use the default endpoint in the current universe domain.
893
+ # @return [::String,nil]
894
+ # @!attribute [rw] credentials
895
+ # Credentials to send with calls. You may provide any of the following types:
896
+ # * (`String`) The path to a service account key file in JSON format
897
+ # * (`Hash`) A service account key as a Hash
898
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
899
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
900
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
901
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
902
+ # * (`nil`) indicating no credentials
903
+ #
904
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
905
+ # external source for authentication to Google Cloud, you must validate it before
906
+ # providing it to a Google API client library. Providing an unvalidated credential
907
+ # configuration to Google APIs can compromise the security of your systems and data.
908
+ # For more information, refer to [Validate credential configurations from external
909
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
910
+ # @return [::Object]
911
+ # @!attribute [rw] scope
912
+ # The OAuth scopes
913
+ # @return [::Array<::String>]
914
+ # @!attribute [rw] lib_name
915
+ # The library name as recorded in instrumentation and logging
916
+ # @return [::String]
917
+ # @!attribute [rw] lib_version
918
+ # The library version as recorded in instrumentation and logging
919
+ # @return [::String]
920
+ # @!attribute [rw] timeout
921
+ # The call timeout in seconds.
922
+ # @return [::Numeric]
923
+ # @!attribute [rw] metadata
924
+ # Additional headers to be sent with the call.
925
+ # @return [::Hash{::Symbol=>::String}]
926
+ # @!attribute [rw] retry_policy
927
+ # The retry policy. The value is a hash with the following keys:
928
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
929
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
930
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
931
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
932
+ # trigger a retry.
933
+ # @return [::Hash]
934
+ # @!attribute [rw] quota_project
935
+ # A separate project against which to charge quota.
936
+ # @return [::String]
937
+ # @!attribute [rw] universe_domain
938
+ # The universe domain within which to make requests. This determines the
939
+ # default endpoint URL. The default value of nil uses the environment
940
+ # universe (usually the default "googleapis.com" universe).
941
+ # @return [::String,nil]
942
+ # @!attribute [rw] logger
943
+ # A custom logger to use for request/response debug logging, or the value
944
+ # `:default` (the default) to construct a default logger, or `nil` to
945
+ # explicitly disable logging.
946
+ # @return [::Logger,:default,nil]
947
+ #
948
+ class Configuration
949
+ extend ::Gapic::Config
950
+
951
+ # @private
952
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
953
+ DEFAULT_ENDPOINT = "iam.googleapis.com"
954
+
955
+ config_attr :endpoint, nil, ::String, nil
956
+ config_attr :credentials, nil do |value|
957
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
958
+ allowed.any? { |klass| klass === value }
959
+ end
960
+ config_attr :scope, nil, ::String, ::Array, nil
961
+ config_attr :lib_name, nil, ::String, nil
962
+ config_attr :lib_version, nil, ::String, nil
963
+ config_attr :timeout, nil, ::Numeric, nil
964
+ config_attr :metadata, nil, ::Hash, nil
965
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
966
+ config_attr :quota_project, nil, ::String, nil
967
+ config_attr :universe_domain, nil, ::String, nil
968
+ config_attr :logger, :default, ::Logger, nil, :default
969
+
970
+ # @private
971
+ def initialize parent_config = nil
972
+ @parent_config = parent_config unless parent_config.nil?
973
+
974
+ yield self if block_given?
975
+ end
976
+
977
+ ##
978
+ # Configurations for individual RPCs
979
+ # @return [Rpcs]
980
+ #
981
+ def rpcs
982
+ @rpcs ||= begin
983
+ parent_rpcs = nil
984
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
985
+ Rpcs.new parent_rpcs
986
+ end
987
+ end
988
+
989
+ ##
990
+ # Configuration RPC class for the PolicyBindings API.
991
+ #
992
+ # Includes fields providing the configuration for each RPC in this service.
993
+ # Each configuration object is of type `Gapic::Config::Method` and includes
994
+ # the following configuration fields:
995
+ #
996
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
997
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
998
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
999
+ # include the following keys:
1000
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1001
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1002
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1003
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1004
+ # trigger a retry.
1005
+ #
1006
+ class Rpcs
1007
+ ##
1008
+ # RPC-specific configuration for `create_policy_binding`
1009
+ # @return [::Gapic::Config::Method]
1010
+ #
1011
+ attr_reader :create_policy_binding
1012
+ ##
1013
+ # RPC-specific configuration for `get_policy_binding`
1014
+ # @return [::Gapic::Config::Method]
1015
+ #
1016
+ attr_reader :get_policy_binding
1017
+ ##
1018
+ # RPC-specific configuration for `update_policy_binding`
1019
+ # @return [::Gapic::Config::Method]
1020
+ #
1021
+ attr_reader :update_policy_binding
1022
+ ##
1023
+ # RPC-specific configuration for `delete_policy_binding`
1024
+ # @return [::Gapic::Config::Method]
1025
+ #
1026
+ attr_reader :delete_policy_binding
1027
+ ##
1028
+ # RPC-specific configuration for `list_policy_bindings`
1029
+ # @return [::Gapic::Config::Method]
1030
+ #
1031
+ attr_reader :list_policy_bindings
1032
+ ##
1033
+ # RPC-specific configuration for `search_target_policy_bindings`
1034
+ # @return [::Gapic::Config::Method]
1035
+ #
1036
+ attr_reader :search_target_policy_bindings
1037
+
1038
+ # @private
1039
+ def initialize parent_rpcs = nil
1040
+ create_policy_binding_config = parent_rpcs.create_policy_binding if parent_rpcs.respond_to? :create_policy_binding
1041
+ @create_policy_binding = ::Gapic::Config::Method.new create_policy_binding_config
1042
+ get_policy_binding_config = parent_rpcs.get_policy_binding if parent_rpcs.respond_to? :get_policy_binding
1043
+ @get_policy_binding = ::Gapic::Config::Method.new get_policy_binding_config
1044
+ update_policy_binding_config = parent_rpcs.update_policy_binding if parent_rpcs.respond_to? :update_policy_binding
1045
+ @update_policy_binding = ::Gapic::Config::Method.new update_policy_binding_config
1046
+ delete_policy_binding_config = parent_rpcs.delete_policy_binding if parent_rpcs.respond_to? :delete_policy_binding
1047
+ @delete_policy_binding = ::Gapic::Config::Method.new delete_policy_binding_config
1048
+ list_policy_bindings_config = parent_rpcs.list_policy_bindings if parent_rpcs.respond_to? :list_policy_bindings
1049
+ @list_policy_bindings = ::Gapic::Config::Method.new list_policy_bindings_config
1050
+ search_target_policy_bindings_config = parent_rpcs.search_target_policy_bindings if parent_rpcs.respond_to? :search_target_policy_bindings
1051
+ @search_target_policy_bindings = ::Gapic::Config::Method.new search_target_policy_bindings_config
1052
+
1053
+ yield self if block_given?
1054
+ end
1055
+ end
1056
+ end
1057
+ end
1058
+ end
1059
+ end
1060
+ end
1061
+ end
1062
+ end