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