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,1015 @@
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/principal_access_boundary_policies_service_pb"
21
+ require "google/iam/v3beta/principal_access_boundary_policies/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Iam
26
+ module V3beta
27
+ module PrincipalAccessBoundaryPolicies
28
+ module Rest
29
+ ##
30
+ # REST client for the PrincipalAccessBoundaryPolicies service.
31
+ #
32
+ # Manages Identity and Access Management (IAM) principal access boundary
33
+ # policies.
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 :principal_access_boundary_policies_stub
46
+
47
+ ##
48
+ # Configure the PrincipalAccessBoundaryPolicies Client class.
49
+ #
50
+ # See {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all PrincipalAccessBoundaryPolicies clients
56
+ # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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_principal_access_boundary_policy.timeout = 30.0
77
+
78
+ default_config.rpcs.get_principal_access_boundary_policy.timeout = 60.0
79
+ default_config.rpcs.get_principal_access_boundary_policy.retry_policy = {
80
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
81
+ }
82
+
83
+ default_config.rpcs.update_principal_access_boundary_policy.timeout = 30.0
84
+
85
+ default_config.rpcs.delete_principal_access_boundary_policy.timeout = 30.0
86
+
87
+ default_config.rpcs.list_principal_access_boundary_policies.timeout = 60.0
88
+ default_config.rpcs.list_principal_access_boundary_policies.retry_policy = {
89
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
90
+ }
91
+
92
+ default_config.rpcs.search_principal_access_boundary_policy_bindings.timeout = 60.0
93
+ default_config.rpcs.search_principal_access_boundary_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 PrincipalAccessBoundaryPolicies 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::PrincipalAccessBoundaryPolicies::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
+ @principal_access_boundary_policies_stub.universe_domain
130
+ end
131
+
132
+ ##
133
+ # Create a new PrincipalAccessBoundaryPolicies REST client object.
134
+ #
135
+ # @example
136
+ #
137
+ # # Create a client using the default configuration
138
+ # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new
139
+ #
140
+ # # Create a client using a custom configuration
141
+ # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config|
142
+ # config.timeout = 10.0
143
+ # end
144
+ #
145
+ # @yield [config] Configure the PrincipalAccessBoundaryPolicies 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::PrincipalAccessBoundaryPolicies::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
+ @principal_access_boundary_policies_stub = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::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
+ @principal_access_boundary_policies_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 = @principal_access_boundary_policies_stub.endpoint
200
+ config.universe_domain = @principal_access_boundary_policies_stub.universe_domain
201
+ config.logger = @principal_access_boundary_policies_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::PrincipalAccessBoundaryPolicies::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
+ @principal_access_boundary_policies_stub.logger
226
+ end
227
+
228
+ # Service calls
229
+
230
+ ##
231
+ # Creates a principal access boundary policy, and returns a long running
232
+ # operation.
233
+ #
234
+ # @overload create_principal_access_boundary_policy(request, options = nil)
235
+ # Pass arguments to `create_principal_access_boundary_policy` via a request object, either of type
236
+ # {::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash.
237
+ #
238
+ # @param request [::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash]
239
+ # A request object representing the call parameters. Required. To specify no
240
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
241
+ # @param options [::Gapic::CallOptions, ::Hash]
242
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
243
+ #
244
+ # @overload create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil)
245
+ # Pass arguments to `create_principal_access_boundary_policy` via keyword arguments. Note that at
246
+ # least one keyword argument is required. To specify no parameters, or to keep all
247
+ # the default parameter values, pass an empty Hash as a request object (see above).
248
+ #
249
+ # @param parent [::String]
250
+ # Required. The parent resource where this principal access boundary policy
251
+ # will be created. Only organizations are supported.
252
+ #
253
+ # Format:
254
+ # `organizations/{organization_id}/locations/{location}`
255
+ # @param principal_access_boundary_policy_id [::String]
256
+ # Required. The ID to use for the principal access boundary policy, which
257
+ # will become the final component of the principal access boundary 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
+ # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash]
264
+ # Required. The principal access boundary policy to create.
265
+ # @param validate_only [::Boolean]
266
+ # Optional. If set, validate the request and preview the creation, but do not
267
+ # actually post it.
268
+ # @yield [result, operation] Access the result along with the TransportOperation object
269
+ # @yieldparam result [::Gapic::Operation]
270
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
271
+ #
272
+ # @return [::Gapic::Operation]
273
+ #
274
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
275
+ #
276
+ # @example Basic example
277
+ # require "google/iam/v3beta"
278
+ #
279
+ # # Create a client object. The client can be reused for multiple calls.
280
+ # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new
281
+ #
282
+ # # Create a request. To set request fields, pass in keyword arguments.
283
+ # request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new
284
+ #
285
+ # # Call the create_principal_access_boundary_policy method.
286
+ # result = client.create_principal_access_boundary_policy request
287
+ #
288
+ # # The returned object is of type Gapic::Operation. You can use it to
289
+ # # check the status of an operation, cancel it, or wait for results.
290
+ # # Here is how to wait for a response.
291
+ # result.wait_until_done! timeout: 60
292
+ # if result.response?
293
+ # p result.response
294
+ # else
295
+ # puts "No response received."
296
+ # end
297
+ #
298
+ def create_principal_access_boundary_policy request, options = nil
299
+ raise ::ArgumentError, "request must be provided" if request.nil?
300
+
301
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest
302
+
303
+ # Converts hash and nil to an options object
304
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
305
+
306
+ # Customize the options with defaults
307
+ call_metadata = @config.rpcs.create_principal_access_boundary_policy.metadata.to_h
308
+
309
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
310
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
311
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
312
+ gapic_version: ::Google::Iam::V3beta::VERSION,
313
+ transports_version_send: [:rest]
314
+
315
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
316
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
317
+
318
+ options.apply_defaults timeout: @config.rpcs.create_principal_access_boundary_policy.timeout,
319
+ metadata: call_metadata,
320
+ retry_policy: @config.rpcs.create_principal_access_boundary_policy.retry_policy
321
+
322
+ options.apply_defaults timeout: @config.timeout,
323
+ metadata: @config.metadata,
324
+ retry_policy: @config.retry_policy
325
+
326
+ @principal_access_boundary_policies_stub.create_principal_access_boundary_policy request, options do |result, operation|
327
+ result = ::Gapic::Operation.new result, @operations_client, options: options
328
+ yield result, operation if block_given?
329
+ throw :response, result
330
+ end
331
+ rescue ::Gapic::Rest::Error => e
332
+ raise ::Google::Cloud::Error.from_error(e)
333
+ end
334
+
335
+ ##
336
+ # Gets a principal access boundary policy.
337
+ #
338
+ # @overload get_principal_access_boundary_policy(request, options = nil)
339
+ # Pass arguments to `get_principal_access_boundary_policy` via a request object, either of type
340
+ # {::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest} or an equivalent Hash.
341
+ #
342
+ # @param request [::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash]
343
+ # A request object representing the call parameters. Required. To specify no
344
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
345
+ # @param options [::Gapic::CallOptions, ::Hash]
346
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
347
+ #
348
+ # @overload get_principal_access_boundary_policy(name: nil)
349
+ # Pass arguments to `get_principal_access_boundary_policy` via keyword arguments. Note that at
350
+ # least one keyword argument is required. To specify no parameters, or to keep all
351
+ # the default parameter values, pass an empty Hash as a request object (see above).
352
+ #
353
+ # @param name [::String]
354
+ # Required. The name of the principal access boundary policy to retrieve.
355
+ #
356
+ # Format:
357
+ # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
358
+ # @yield [result, operation] Access the result along with the TransportOperation object
359
+ # @yieldparam result [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy]
360
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
361
+ #
362
+ # @return [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy]
363
+ #
364
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
365
+ #
366
+ # @example Basic example
367
+ # require "google/iam/v3beta"
368
+ #
369
+ # # Create a client object. The client can be reused for multiple calls.
370
+ # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new
371
+ #
372
+ # # Create a request. To set request fields, pass in keyword arguments.
373
+ # request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new
374
+ #
375
+ # # Call the get_principal_access_boundary_policy method.
376
+ # result = client.get_principal_access_boundary_policy request
377
+ #
378
+ # # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.
379
+ # p result
380
+ #
381
+ def get_principal_access_boundary_policy request, options = nil
382
+ raise ::ArgumentError, "request must be provided" if request.nil?
383
+
384
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest
385
+
386
+ # Converts hash and nil to an options object
387
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
388
+
389
+ # Customize the options with defaults
390
+ call_metadata = @config.rpcs.get_principal_access_boundary_policy.metadata.to_h
391
+
392
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
393
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
394
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
395
+ gapic_version: ::Google::Iam::V3beta::VERSION,
396
+ transports_version_send: [:rest]
397
+
398
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
399
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
400
+
401
+ options.apply_defaults timeout: @config.rpcs.get_principal_access_boundary_policy.timeout,
402
+ metadata: call_metadata,
403
+ retry_policy: @config.rpcs.get_principal_access_boundary_policy.retry_policy
404
+
405
+ options.apply_defaults timeout: @config.timeout,
406
+ metadata: @config.metadata,
407
+ retry_policy: @config.retry_policy
408
+
409
+ @principal_access_boundary_policies_stub.get_principal_access_boundary_policy request, options do |result, operation|
410
+ yield result, operation if block_given?
411
+ end
412
+ rescue ::Gapic::Rest::Error => e
413
+ raise ::Google::Cloud::Error.from_error(e)
414
+ end
415
+
416
+ ##
417
+ # Updates a principal access boundary policy.
418
+ #
419
+ # @overload update_principal_access_boundary_policy(request, options = nil)
420
+ # Pass arguments to `update_principal_access_boundary_policy` via a request object, either of type
421
+ # {::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash.
422
+ #
423
+ # @param request [::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash]
424
+ # A request object representing the call parameters. Required. To specify no
425
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
426
+ # @param options [::Gapic::CallOptions, ::Hash]
427
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
428
+ #
429
+ # @overload update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil)
430
+ # Pass arguments to `update_principal_access_boundary_policy` via keyword arguments. Note that at
431
+ # least one keyword argument is required. To specify no parameters, or to keep all
432
+ # the default parameter values, pass an empty Hash as a request object (see above).
433
+ #
434
+ # @param principal_access_boundary_policy [::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash]
435
+ # Required. The principal access boundary policy to update.
436
+ #
437
+ # The principal access boundary policy's `name` field is used to identify the
438
+ # policy to update.
439
+ # @param validate_only [::Boolean]
440
+ # Optional. If set, validate the request and preview the update, but do not
441
+ # actually post it.
442
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
443
+ # Optional. The list of fields to update
444
+ # @yield [result, operation] Access the result along with the TransportOperation object
445
+ # @yieldparam result [::Gapic::Operation]
446
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
447
+ #
448
+ # @return [::Gapic::Operation]
449
+ #
450
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
451
+ #
452
+ # @example Basic example
453
+ # require "google/iam/v3beta"
454
+ #
455
+ # # Create a client object. The client can be reused for multiple calls.
456
+ # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new
457
+ #
458
+ # # Create a request. To set request fields, pass in keyword arguments.
459
+ # request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new
460
+ #
461
+ # # Call the update_principal_access_boundary_policy method.
462
+ # result = client.update_principal_access_boundary_policy request
463
+ #
464
+ # # The returned object is of type Gapic::Operation. You can use it to
465
+ # # check the status of an operation, cancel it, or wait for results.
466
+ # # Here is how to wait for a response.
467
+ # result.wait_until_done! timeout: 60
468
+ # if result.response?
469
+ # p result.response
470
+ # else
471
+ # puts "No response received."
472
+ # end
473
+ #
474
+ def update_principal_access_boundary_policy request, options = nil
475
+ raise ::ArgumentError, "request must be provided" if request.nil?
476
+
477
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest
478
+
479
+ # Converts hash and nil to an options object
480
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
481
+
482
+ # Customize the options with defaults
483
+ call_metadata = @config.rpcs.update_principal_access_boundary_policy.metadata.to_h
484
+
485
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
486
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
487
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
488
+ gapic_version: ::Google::Iam::V3beta::VERSION,
489
+ transports_version_send: [:rest]
490
+
491
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
492
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
493
+
494
+ options.apply_defaults timeout: @config.rpcs.update_principal_access_boundary_policy.timeout,
495
+ metadata: call_metadata,
496
+ retry_policy: @config.rpcs.update_principal_access_boundary_policy.retry_policy
497
+
498
+ options.apply_defaults timeout: @config.timeout,
499
+ metadata: @config.metadata,
500
+ retry_policy: @config.retry_policy
501
+
502
+ @principal_access_boundary_policies_stub.update_principal_access_boundary_policy request, options do |result, operation|
503
+ result = ::Gapic::Operation.new result, @operations_client, options: options
504
+ yield result, operation if block_given?
505
+ throw :response, result
506
+ end
507
+ rescue ::Gapic::Rest::Error => e
508
+ raise ::Google::Cloud::Error.from_error(e)
509
+ end
510
+
511
+ ##
512
+ # Deletes a principal access boundary policy.
513
+ #
514
+ # @overload delete_principal_access_boundary_policy(request, options = nil)
515
+ # Pass arguments to `delete_principal_access_boundary_policy` via a request object, either of type
516
+ # {::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest} or an equivalent Hash.
517
+ #
518
+ # @param request [::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash]
519
+ # A request object representing the call parameters. Required. To specify no
520
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
521
+ # @param options [::Gapic::CallOptions, ::Hash]
522
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
523
+ #
524
+ # @overload delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil)
525
+ # Pass arguments to `delete_principal_access_boundary_policy` via keyword arguments. Note that at
526
+ # least one keyword argument is required. To specify no parameters, or to keep all
527
+ # the default parameter values, pass an empty Hash as a request object (see above).
528
+ #
529
+ # @param name [::String]
530
+ # Required. The name of the principal access boundary policy to delete.
531
+ #
532
+ # Format:
533
+ # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
534
+ # @param etag [::String]
535
+ # Optional. The etag of the principal access boundary policy.
536
+ # If this is provided, it must match the server's etag.
537
+ # @param validate_only [::Boolean]
538
+ # Optional. If set, validate the request and preview the deletion, but do not
539
+ # actually post it.
540
+ # @param force [::Boolean]
541
+ # Optional. If set to true, the request will force the deletion of the policy
542
+ # even if the policy is referenced in policy bindings.
543
+ # @yield [result, operation] Access the result along with the TransportOperation object
544
+ # @yieldparam result [::Gapic::Operation]
545
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
546
+ #
547
+ # @return [::Gapic::Operation]
548
+ #
549
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
550
+ #
551
+ # @example Basic example
552
+ # require "google/iam/v3beta"
553
+ #
554
+ # # Create a client object. The client can be reused for multiple calls.
555
+ # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new
556
+ #
557
+ # # Create a request. To set request fields, pass in keyword arguments.
558
+ # request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new
559
+ #
560
+ # # Call the delete_principal_access_boundary_policy method.
561
+ # result = client.delete_principal_access_boundary_policy request
562
+ #
563
+ # # The returned object is of type Gapic::Operation. You can use it to
564
+ # # check the status of an operation, cancel it, or wait for results.
565
+ # # Here is how to wait for a response.
566
+ # result.wait_until_done! timeout: 60
567
+ # if result.response?
568
+ # p result.response
569
+ # else
570
+ # puts "No response received."
571
+ # end
572
+ #
573
+ def delete_principal_access_boundary_policy request, options = nil
574
+ raise ::ArgumentError, "request must be provided" if request.nil?
575
+
576
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest
577
+
578
+ # Converts hash and nil to an options object
579
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
580
+
581
+ # Customize the options with defaults
582
+ call_metadata = @config.rpcs.delete_principal_access_boundary_policy.metadata.to_h
583
+
584
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
585
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
586
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
587
+ gapic_version: ::Google::Iam::V3beta::VERSION,
588
+ transports_version_send: [:rest]
589
+
590
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
591
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
592
+
593
+ options.apply_defaults timeout: @config.rpcs.delete_principal_access_boundary_policy.timeout,
594
+ metadata: call_metadata,
595
+ retry_policy: @config.rpcs.delete_principal_access_boundary_policy.retry_policy
596
+
597
+ options.apply_defaults timeout: @config.timeout,
598
+ metadata: @config.metadata,
599
+ retry_policy: @config.retry_policy
600
+
601
+ @principal_access_boundary_policies_stub.delete_principal_access_boundary_policy request, options do |result, operation|
602
+ result = ::Gapic::Operation.new result, @operations_client, options: options
603
+ yield result, operation if block_given?
604
+ throw :response, result
605
+ end
606
+ rescue ::Gapic::Rest::Error => e
607
+ raise ::Google::Cloud::Error.from_error(e)
608
+ end
609
+
610
+ ##
611
+ # Lists principal access boundary policies.
612
+ #
613
+ # @overload list_principal_access_boundary_policies(request, options = nil)
614
+ # Pass arguments to `list_principal_access_boundary_policies` via a request object, either of type
615
+ # {::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest} or an equivalent Hash.
616
+ #
617
+ # @param request [::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash]
618
+ # A request object representing the call parameters. Required. To specify no
619
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
620
+ # @param options [::Gapic::CallOptions, ::Hash]
621
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
622
+ #
623
+ # @overload list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil)
624
+ # Pass arguments to `list_principal_access_boundary_policies` via keyword arguments. Note that at
625
+ # least one keyword argument is required. To specify no parameters, or to keep all
626
+ # the default parameter values, pass an empty Hash as a request object (see above).
627
+ #
628
+ # @param parent [::String]
629
+ # Required. The parent resource, which owns the collection of principal
630
+ # access boundary policies.
631
+ #
632
+ # Format:
633
+ # `organizations/{organization_id}/locations/{location}`
634
+ # @param page_size [::Integer]
635
+ # Optional. The maximum number of principal access boundary policies to
636
+ # return. The service may return fewer than this value.
637
+ #
638
+ # If unspecified, at most 50 principal access boundary policies will be
639
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
640
+ # 1000.
641
+ # @param page_token [::String]
642
+ # Optional. A page token, received from a previous
643
+ # `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
644
+ # subsequent page.
645
+ #
646
+ # When paginating, all other parameters provided to
647
+ # `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
648
+ # page token.
649
+ # @yield [result, operation] Access the result along with the TransportOperation object
650
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>]
651
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
652
+ #
653
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>]
654
+ #
655
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
656
+ #
657
+ # @example Basic example
658
+ # require "google/iam/v3beta"
659
+ #
660
+ # # Create a client object. The client can be reused for multiple calls.
661
+ # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new
662
+ #
663
+ # # Create a request. To set request fields, pass in keyword arguments.
664
+ # request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new
665
+ #
666
+ # # Call the list_principal_access_boundary_policies method.
667
+ # result = client.list_principal_access_boundary_policies request
668
+ #
669
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
670
+ # # over elements, and API calls will be issued to fetch pages as needed.
671
+ # result.each do |item|
672
+ # # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy.
673
+ # p item
674
+ # end
675
+ #
676
+ def list_principal_access_boundary_policies request, options = nil
677
+ raise ::ArgumentError, "request must be provided" if request.nil?
678
+
679
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest
680
+
681
+ # Converts hash and nil to an options object
682
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
683
+
684
+ # Customize the options with defaults
685
+ call_metadata = @config.rpcs.list_principal_access_boundary_policies.metadata.to_h
686
+
687
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
688
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
689
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
690
+ gapic_version: ::Google::Iam::V3beta::VERSION,
691
+ transports_version_send: [:rest]
692
+
693
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
694
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
695
+
696
+ options.apply_defaults timeout: @config.rpcs.list_principal_access_boundary_policies.timeout,
697
+ metadata: call_metadata,
698
+ retry_policy: @config.rpcs.list_principal_access_boundary_policies.retry_policy
699
+
700
+ options.apply_defaults timeout: @config.timeout,
701
+ metadata: @config.metadata,
702
+ retry_policy: @config.retry_policy
703
+
704
+ @principal_access_boundary_policies_stub.list_principal_access_boundary_policies request, options do |result, operation|
705
+ result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :list_principal_access_boundary_policies, "principal_access_boundary_policies", request, result, options
706
+ yield result, operation if block_given?
707
+ throw :response, result
708
+ end
709
+ rescue ::Gapic::Rest::Error => e
710
+ raise ::Google::Cloud::Error.from_error(e)
711
+ end
712
+
713
+ ##
714
+ # Returns all policy bindings that bind a specific policy if a user has
715
+ # searchPolicyBindings permission on that policy.
716
+ #
717
+ # @overload search_principal_access_boundary_policy_bindings(request, options = nil)
718
+ # Pass arguments to `search_principal_access_boundary_policy_bindings` via a request object, either of type
719
+ # {::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest} or an equivalent Hash.
720
+ #
721
+ # @param request [::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash]
722
+ # A request object representing the call parameters. Required. To specify no
723
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
724
+ # @param options [::Gapic::CallOptions, ::Hash]
725
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
726
+ #
727
+ # @overload search_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil)
728
+ # Pass arguments to `search_principal_access_boundary_policy_bindings` via keyword arguments. Note that at
729
+ # least one keyword argument is required. To specify no parameters, or to keep all
730
+ # the default parameter values, pass an empty Hash as a request object (see above).
731
+ #
732
+ # @param name [::String]
733
+ # Required. The name of the principal access boundary policy.
734
+ # Format:
735
+ # `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
736
+ # @param page_size [::Integer]
737
+ # Optional. The maximum number of policy bindings to return. The service may
738
+ # return fewer than this value.
739
+ #
740
+ # If unspecified, at most 50 policy bindings will be returned.
741
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
742
+ # @param page_token [::String]
743
+ # Optional. A page token, received from a previous
744
+ # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
745
+ # retrieve the subsequent page.
746
+ #
747
+ # When paginating, all other parameters provided to
748
+ # `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
749
+ # that provided the page token.
750
+ # @yield [result, operation] Access the result along with the TransportOperation object
751
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>]
752
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
753
+ #
754
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>]
755
+ #
756
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
757
+ #
758
+ # @example Basic example
759
+ # require "google/iam/v3beta"
760
+ #
761
+ # # Create a client object. The client can be reused for multiple calls.
762
+ # client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new
763
+ #
764
+ # # Create a request. To set request fields, pass in keyword arguments.
765
+ # request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new
766
+ #
767
+ # # Call the search_principal_access_boundary_policy_bindings method.
768
+ # result = client.search_principal_access_boundary_policy_bindings request
769
+ #
770
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
771
+ # # over elements, and API calls will be issued to fetch pages as needed.
772
+ # result.each do |item|
773
+ # # Each element is of type ::Google::Iam::V3beta::PolicyBinding.
774
+ # p item
775
+ # end
776
+ #
777
+ def search_principal_access_boundary_policy_bindings request, options = nil
778
+ raise ::ArgumentError, "request must be provided" if request.nil?
779
+
780
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest
781
+
782
+ # Converts hash and nil to an options object
783
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
784
+
785
+ # Customize the options with defaults
786
+ call_metadata = @config.rpcs.search_principal_access_boundary_policy_bindings.metadata.to_h
787
+
788
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
789
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
790
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
791
+ gapic_version: ::Google::Iam::V3beta::VERSION,
792
+ transports_version_send: [:rest]
793
+
794
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
795
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
796
+
797
+ options.apply_defaults timeout: @config.rpcs.search_principal_access_boundary_policy_bindings.timeout,
798
+ metadata: call_metadata,
799
+ retry_policy: @config.rpcs.search_principal_access_boundary_policy_bindings.retry_policy
800
+
801
+ options.apply_defaults timeout: @config.timeout,
802
+ metadata: @config.metadata,
803
+ retry_policy: @config.retry_policy
804
+
805
+ @principal_access_boundary_policies_stub.search_principal_access_boundary_policy_bindings request, options do |result, operation|
806
+ result = ::Gapic::Rest::PagedEnumerable.new @principal_access_boundary_policies_stub, :search_principal_access_boundary_policy_bindings, "policy_bindings", request, result, options
807
+ yield result, operation if block_given?
808
+ throw :response, result
809
+ end
810
+ rescue ::Gapic::Rest::Error => e
811
+ raise ::Google::Cloud::Error.from_error(e)
812
+ end
813
+
814
+ ##
815
+ # Configuration class for the PrincipalAccessBoundaryPolicies REST API.
816
+ #
817
+ # This class represents the configuration for PrincipalAccessBoundaryPolicies REST,
818
+ # providing control over timeouts, retry behavior, logging, transport
819
+ # parameters, and other low-level controls. Certain parameters can also be
820
+ # applied individually to specific RPCs. See
821
+ # {::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client::Configuration::Rpcs}
822
+ # for a list of RPCs that can be configured independently.
823
+ #
824
+ # Configuration can be applied globally to all clients, or to a single client
825
+ # on construction.
826
+ #
827
+ # @example
828
+ #
829
+ # # Modify the global config, setting the timeout for
830
+ # # create_principal_access_boundary_policy to 20 seconds,
831
+ # # and all remaining timeouts to 10 seconds.
832
+ # ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.configure do |config|
833
+ # config.timeout = 10.0
834
+ # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0
835
+ # end
836
+ #
837
+ # # Apply the above configuration only to a new client.
838
+ # client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Rest::Client.new do |config|
839
+ # config.timeout = 10.0
840
+ # config.rpcs.create_principal_access_boundary_policy.timeout = 20.0
841
+ # end
842
+ #
843
+ # @!attribute [rw] endpoint
844
+ # A custom service endpoint, as a hostname or hostname:port. The default is
845
+ # nil, indicating to use the default endpoint in the current universe domain.
846
+ # @return [::String,nil]
847
+ # @!attribute [rw] credentials
848
+ # Credentials to send with calls. You may provide any of the following types:
849
+ # * (`String`) The path to a service account key file in JSON format
850
+ # * (`Hash`) A service account key as a Hash
851
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
852
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
853
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
854
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
855
+ # * (`nil`) indicating no credentials
856
+ #
857
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
858
+ # external source for authentication to Google Cloud, you must validate it before
859
+ # providing it to a Google API client library. Providing an unvalidated credential
860
+ # configuration to Google APIs can compromise the security of your systems and data.
861
+ # For more information, refer to [Validate credential configurations from external
862
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
863
+ # @return [::Object]
864
+ # @!attribute [rw] scope
865
+ # The OAuth scopes
866
+ # @return [::Array<::String>]
867
+ # @!attribute [rw] lib_name
868
+ # The library name as recorded in instrumentation and logging
869
+ # @return [::String]
870
+ # @!attribute [rw] lib_version
871
+ # The library version as recorded in instrumentation and logging
872
+ # @return [::String]
873
+ # @!attribute [rw] timeout
874
+ # The call timeout in seconds.
875
+ # @return [::Numeric]
876
+ # @!attribute [rw] metadata
877
+ # Additional headers to be sent with the call.
878
+ # @return [::Hash{::Symbol=>::String}]
879
+ # @!attribute [rw] retry_policy
880
+ # The retry policy. The value is a hash with the following keys:
881
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
882
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
883
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
884
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
885
+ # trigger a retry.
886
+ # @return [::Hash]
887
+ # @!attribute [rw] quota_project
888
+ # A separate project against which to charge quota.
889
+ # @return [::String]
890
+ # @!attribute [rw] universe_domain
891
+ # The universe domain within which to make requests. This determines the
892
+ # default endpoint URL. The default value of nil uses the environment
893
+ # universe (usually the default "googleapis.com" universe).
894
+ # @return [::String,nil]
895
+ # @!attribute [rw] logger
896
+ # A custom logger to use for request/response debug logging, or the value
897
+ # `:default` (the default) to construct a default logger, or `nil` to
898
+ # explicitly disable logging.
899
+ # @return [::Logger,:default,nil]
900
+ #
901
+ class Configuration
902
+ extend ::Gapic::Config
903
+
904
+ # @private
905
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
906
+ DEFAULT_ENDPOINT = "iam.googleapis.com"
907
+
908
+ config_attr :endpoint, nil, ::String, nil
909
+ config_attr :credentials, nil do |value|
910
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
911
+ allowed.any? { |klass| klass === value }
912
+ end
913
+ config_attr :scope, nil, ::String, ::Array, nil
914
+ config_attr :lib_name, nil, ::String, nil
915
+ config_attr :lib_version, nil, ::String, nil
916
+ config_attr :timeout, nil, ::Numeric, nil
917
+ config_attr :metadata, nil, ::Hash, nil
918
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
919
+ config_attr :quota_project, nil, ::String, nil
920
+ config_attr :universe_domain, nil, ::String, nil
921
+ config_attr :logger, :default, ::Logger, nil, :default
922
+
923
+ # @private
924
+ def initialize parent_config = nil
925
+ @parent_config = parent_config unless parent_config.nil?
926
+
927
+ yield self if block_given?
928
+ end
929
+
930
+ ##
931
+ # Configurations for individual RPCs
932
+ # @return [Rpcs]
933
+ #
934
+ def rpcs
935
+ @rpcs ||= begin
936
+ parent_rpcs = nil
937
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
938
+ Rpcs.new parent_rpcs
939
+ end
940
+ end
941
+
942
+ ##
943
+ # Configuration RPC class for the PrincipalAccessBoundaryPolicies API.
944
+ #
945
+ # Includes fields providing the configuration for each RPC in this service.
946
+ # Each configuration object is of type `Gapic::Config::Method` and includes
947
+ # the following configuration fields:
948
+ #
949
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
950
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
951
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
952
+ # include the following keys:
953
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
954
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
955
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
956
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
957
+ # trigger a retry.
958
+ #
959
+ class Rpcs
960
+ ##
961
+ # RPC-specific configuration for `create_principal_access_boundary_policy`
962
+ # @return [::Gapic::Config::Method]
963
+ #
964
+ attr_reader :create_principal_access_boundary_policy
965
+ ##
966
+ # RPC-specific configuration for `get_principal_access_boundary_policy`
967
+ # @return [::Gapic::Config::Method]
968
+ #
969
+ attr_reader :get_principal_access_boundary_policy
970
+ ##
971
+ # RPC-specific configuration for `update_principal_access_boundary_policy`
972
+ # @return [::Gapic::Config::Method]
973
+ #
974
+ attr_reader :update_principal_access_boundary_policy
975
+ ##
976
+ # RPC-specific configuration for `delete_principal_access_boundary_policy`
977
+ # @return [::Gapic::Config::Method]
978
+ #
979
+ attr_reader :delete_principal_access_boundary_policy
980
+ ##
981
+ # RPC-specific configuration for `list_principal_access_boundary_policies`
982
+ # @return [::Gapic::Config::Method]
983
+ #
984
+ attr_reader :list_principal_access_boundary_policies
985
+ ##
986
+ # RPC-specific configuration for `search_principal_access_boundary_policy_bindings`
987
+ # @return [::Gapic::Config::Method]
988
+ #
989
+ attr_reader :search_principal_access_boundary_policy_bindings
990
+
991
+ # @private
992
+ def initialize parent_rpcs = nil
993
+ create_principal_access_boundary_policy_config = parent_rpcs.create_principal_access_boundary_policy if parent_rpcs.respond_to? :create_principal_access_boundary_policy
994
+ @create_principal_access_boundary_policy = ::Gapic::Config::Method.new create_principal_access_boundary_policy_config
995
+ get_principal_access_boundary_policy_config = parent_rpcs.get_principal_access_boundary_policy if parent_rpcs.respond_to? :get_principal_access_boundary_policy
996
+ @get_principal_access_boundary_policy = ::Gapic::Config::Method.new get_principal_access_boundary_policy_config
997
+ update_principal_access_boundary_policy_config = parent_rpcs.update_principal_access_boundary_policy if parent_rpcs.respond_to? :update_principal_access_boundary_policy
998
+ @update_principal_access_boundary_policy = ::Gapic::Config::Method.new update_principal_access_boundary_policy_config
999
+ delete_principal_access_boundary_policy_config = parent_rpcs.delete_principal_access_boundary_policy if parent_rpcs.respond_to? :delete_principal_access_boundary_policy
1000
+ @delete_principal_access_boundary_policy = ::Gapic::Config::Method.new delete_principal_access_boundary_policy_config
1001
+ list_principal_access_boundary_policies_config = parent_rpcs.list_principal_access_boundary_policies if parent_rpcs.respond_to? :list_principal_access_boundary_policies
1002
+ @list_principal_access_boundary_policies = ::Gapic::Config::Method.new list_principal_access_boundary_policies_config
1003
+ search_principal_access_boundary_policy_bindings_config = parent_rpcs.search_principal_access_boundary_policy_bindings if parent_rpcs.respond_to? :search_principal_access_boundary_policy_bindings
1004
+ @search_principal_access_boundary_policy_bindings = ::Gapic::Config::Method.new search_principal_access_boundary_policy_bindings_config
1005
+
1006
+ yield self if block_given?
1007
+ end
1008
+ end
1009
+ end
1010
+ end
1011
+ end
1012
+ end
1013
+ end
1014
+ end
1015
+ end