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