google-cloud-access_approval-v1 0.7.1 → 0.9.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.
@@ -0,0 +1,1018 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/accessapproval/v1/accessapproval_pb"
21
+ require "google/cloud/access_approval/v1/access_approval/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module AccessApproval
26
+ module V1
27
+ module AccessApproval
28
+ module Rest
29
+ ##
30
+ # REST client for the AccessApproval service.
31
+ #
32
+ # This API allows a customer to manage accesses to cloud resources by
33
+ # Google personnel. It defines the following resource model:
34
+ #
35
+ # - The API has a collection of
36
+ # {::Google::Cloud::AccessApproval::V1::ApprovalRequest ApprovalRequest}
37
+ # resources, named `approvalRequests/{approval_request}`
38
+ # - The API has top-level settings per Project/Folder/Organization, named
39
+ # `accessApprovalSettings`
40
+ #
41
+ # The service also periodically emails a list of recipients, defined at the
42
+ # Project/Folder/Organization level in the accessApprovalSettings, when there
43
+ # is a pending ApprovalRequest for them to act on. The ApprovalRequests can
44
+ # also optionally be published to a Pub/Sub topic owned by the customer
45
+ # (contact support if you would like to enable Pub/Sub notifications).
46
+ #
47
+ # ApprovalRequests can be approved or dismissed. Google personnel can only
48
+ # access the indicated resource or resources if the request is approved
49
+ # (subject to some exclusions:
50
+ # https://cloud.google.com/access-approval/docs/overview#exclusions).
51
+ #
52
+ # Note: Using Access Approval functionality will mean that Google may not be
53
+ # able to meet the SLAs for your chosen products, as any support response times
54
+ # may be dramatically increased. As such the SLAs do not apply to any service
55
+ # disruption to the extent impacted by Customer's use of Access Approval. Do
56
+ # not enable Access Approval for projects where you may require high service
57
+ # availability and rapid response by Google Cloud Support.
58
+ #
59
+ # After a request is approved or dismissed, no further action may be taken on
60
+ # it. Requests with the requested_expiration in the past or with no activity
61
+ # for 14 days are considered dismissed. When an approval expires, the request
62
+ # is considered dismissed.
63
+ #
64
+ # If a request is not approved or dismissed, we call it pending.
65
+ #
66
+ class Client
67
+ include Paths
68
+
69
+ # @private
70
+ attr_reader :access_approval_stub
71
+
72
+ ##
73
+ # Configure the AccessApproval Client class.
74
+ #
75
+ # See {::Google::Cloud::AccessApproval::V1::AccessApproval::Rest::Client::Configuration}
76
+ # for a description of the configuration fields.
77
+ #
78
+ # @example
79
+ #
80
+ # # Modify the configuration for all AccessApproval clients
81
+ # ::Google::Cloud::AccessApproval::V1::AccessApproval::Rest::Client.configure do |config|
82
+ # config.timeout = 10.0
83
+ # end
84
+ #
85
+ # @yield [config] Configure the Client client.
86
+ # @yieldparam config [Client::Configuration]
87
+ #
88
+ # @return [Client::Configuration]
89
+ #
90
+ def self.configure
91
+ @configure ||= begin
92
+ namespace = ["Google", "Cloud", "AccessApproval", "V1"]
93
+ parent_config = while namespace.any?
94
+ parent_name = namespace.join "::"
95
+ parent_const = const_get parent_name
96
+ break parent_const.configure if parent_const.respond_to? :configure
97
+ namespace.pop
98
+ end
99
+ default_config = Client::Configuration.new parent_config
100
+
101
+ default_config.rpcs.list_approval_requests.timeout = 600.0
102
+ default_config.rpcs.list_approval_requests.retry_policy = {
103
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
104
+ }
105
+
106
+ default_config.rpcs.get_approval_request.timeout = 600.0
107
+ default_config.rpcs.get_approval_request.retry_policy = {
108
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
109
+ }
110
+
111
+ default_config.rpcs.approve_approval_request.timeout = 600.0
112
+
113
+ default_config.rpcs.dismiss_approval_request.timeout = 600.0
114
+
115
+ default_config.rpcs.invalidate_approval_request.timeout = 600.0
116
+
117
+ default_config.rpcs.get_access_approval_settings.timeout = 600.0
118
+ default_config.rpcs.get_access_approval_settings.retry_policy = {
119
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
120
+ }
121
+
122
+ default_config.rpcs.update_access_approval_settings.timeout = 600.0
123
+
124
+ default_config.rpcs.delete_access_approval_settings.timeout = 600.0
125
+
126
+ default_config
127
+ end
128
+ yield @configure if block_given?
129
+ @configure
130
+ end
131
+
132
+ ##
133
+ # Configure the AccessApproval Client instance.
134
+ #
135
+ # The configuration is set to the derived mode, meaning that values can be changed,
136
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
137
+ # should be made on {Client.configure}.
138
+ #
139
+ # See {::Google::Cloud::AccessApproval::V1::AccessApproval::Rest::Client::Configuration}
140
+ # for a description of the configuration fields.
141
+ #
142
+ # @yield [config] Configure the Client client.
143
+ # @yieldparam config [Client::Configuration]
144
+ #
145
+ # @return [Client::Configuration]
146
+ #
147
+ def configure
148
+ yield @config if block_given?
149
+ @config
150
+ end
151
+
152
+ ##
153
+ # Create a new AccessApproval REST client object.
154
+ #
155
+ # @example
156
+ #
157
+ # # Create a client using the default configuration
158
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Rest::Client.new
159
+ #
160
+ # # Create a client using a custom configuration
161
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Rest::Client.new do |config|
162
+ # config.timeout = 10.0
163
+ # end
164
+ #
165
+ # @yield [config] Configure the AccessApproval client.
166
+ # @yieldparam config [Client::Configuration]
167
+ #
168
+ def initialize
169
+ # Create the configuration object
170
+ @config = Configuration.new Client.configure
171
+
172
+ # Yield the configuration if needed
173
+ yield @config if block_given?
174
+
175
+ # Create credentials
176
+ credentials = @config.credentials
177
+ # Use self-signed JWT if the endpoint is unchanged from default,
178
+ # but only if the default endpoint does not have a region prefix.
179
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
180
+ !@config.endpoint.split(".").first.include?("-")
181
+ credentials ||= Credentials.default scope: @config.scope,
182
+ enable_self_signed_jwt: enable_self_signed_jwt
183
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
184
+ credentials = Credentials.new credentials, scope: @config.scope
185
+ end
186
+
187
+ @quota_project_id = @config.quota_project
188
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
189
+
190
+ @access_approval_stub = ::Google::Cloud::AccessApproval::V1::AccessApproval::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
191
+ end
192
+
193
+ # Service calls
194
+
195
+ ##
196
+ # Lists approval requests associated with a project, folder, or organization.
197
+ # Approval requests can be filtered by state (pending, active, dismissed).
198
+ # The order is reverse chronological.
199
+ #
200
+ # @overload list_approval_requests(request, options = nil)
201
+ # Pass arguments to `list_approval_requests` via a request object, either of type
202
+ # {::Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage} or an equivalent Hash.
203
+ #
204
+ # @param request [::Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage, ::Hash]
205
+ # A request object representing the call parameters. Required. To specify no
206
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
207
+ # @param options [::Gapic::CallOptions, ::Hash]
208
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
209
+ #
210
+ # @overload list_approval_requests(parent: nil, filter: nil, page_size: nil, page_token: nil)
211
+ # Pass arguments to `list_approval_requests` via keyword arguments. Note that at
212
+ # least one keyword argument is required. To specify no parameters, or to keep all
213
+ # the default parameter values, pass an empty Hash as a request object (see above).
214
+ #
215
+ # @param parent [::String]
216
+ # The parent resource. This may be "projects/\\{project}",
217
+ # "folders/\\{folder}", or "organizations/\\{organization}".
218
+ # @param filter [::String]
219
+ # A filter on the type of approval requests to retrieve. Must be one of the
220
+ # following values:
221
+ #
222
+ # * [not set]: Requests that are pending or have active approvals.
223
+ # * ALL: All requests.
224
+ # * PENDING: Only pending requests.
225
+ # * ACTIVE: Only active (i.e. currently approved) requests.
226
+ # * DISMISSED: Only requests that have been dismissed, or requests that
227
+ # are not approved and past expiration.
228
+ # * EXPIRED: Only requests that have been approved, and the approval has
229
+ # expired.
230
+ # * HISTORY: Active, dismissed and expired requests.
231
+ # @param page_size [::Integer]
232
+ # Requested page size.
233
+ # @param page_token [::String]
234
+ # A token identifying the page of results to return.
235
+ # @yield [result, operation] Access the result along with the TransportOperation object
236
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AccessApproval::V1::ApprovalRequest>]
237
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
238
+ #
239
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AccessApproval::V1::ApprovalRequest>]
240
+ #
241
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
242
+ def list_approval_requests request, options = nil
243
+ raise ::ArgumentError, "request must be provided" if request.nil?
244
+
245
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage
246
+
247
+ # Converts hash and nil to an options object
248
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
249
+
250
+ # Customize the options with defaults
251
+ call_metadata = @config.rpcs.list_approval_requests.metadata.to_h
252
+
253
+ # Set x-goog-api-client and x-goog-user-project headers
254
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
255
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
256
+ gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION,
257
+ transports_version_send: [:rest]
258
+
259
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
260
+
261
+ options.apply_defaults timeout: @config.rpcs.list_approval_requests.timeout,
262
+ metadata: call_metadata,
263
+ retry_policy: @config.rpcs.list_approval_requests.retry_policy
264
+
265
+ options.apply_defaults timeout: @config.timeout,
266
+ metadata: @config.metadata,
267
+ retry_policy: @config.retry_policy
268
+
269
+ @access_approval_stub.list_approval_requests request, options do |result, operation|
270
+ result = ::Gapic::Rest::PagedEnumerable.new @access_approval_stub, :list_approval_requests, "approval_requests", request, result, options
271
+ yield result, operation if block_given?
272
+ return result
273
+ end
274
+ rescue ::Gapic::Rest::Error => e
275
+ raise ::Google::Cloud::Error.from_error(e)
276
+ end
277
+
278
+ ##
279
+ # Gets an approval request. Returns NOT_FOUND if the request does not exist.
280
+ #
281
+ # @overload get_approval_request(request, options = nil)
282
+ # Pass arguments to `get_approval_request` via a request object, either of type
283
+ # {::Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage} or an equivalent Hash.
284
+ #
285
+ # @param request [::Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage, ::Hash]
286
+ # A request object representing the call parameters. Required. To specify no
287
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
288
+ # @param options [::Gapic::CallOptions, ::Hash]
289
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
290
+ #
291
+ # @overload get_approval_request(name: nil)
292
+ # Pass arguments to `get_approval_request` via keyword arguments. Note that at
293
+ # least one keyword argument is required. To specify no parameters, or to keep all
294
+ # the default parameter values, pass an empty Hash as a request object (see above).
295
+ #
296
+ # @param name [::String]
297
+ # The name of the approval request to retrieve.
298
+ # Format:
299
+ # "\\{projects|folders|organizations}/\\{id}/approvalRequests/\\{approval_request}"
300
+ # @yield [result, operation] Access the result along with the TransportOperation object
301
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
302
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
303
+ #
304
+ # @return [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
305
+ #
306
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
307
+ def get_approval_request request, options = nil
308
+ raise ::ArgumentError, "request must be provided" if request.nil?
309
+
310
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage
311
+
312
+ # Converts hash and nil to an options object
313
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
314
+
315
+ # Customize the options with defaults
316
+ call_metadata = @config.rpcs.get_approval_request.metadata.to_h
317
+
318
+ # Set x-goog-api-client and x-goog-user-project headers
319
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
320
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
321
+ gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION,
322
+ transports_version_send: [:rest]
323
+
324
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
325
+
326
+ options.apply_defaults timeout: @config.rpcs.get_approval_request.timeout,
327
+ metadata: call_metadata,
328
+ retry_policy: @config.rpcs.get_approval_request.retry_policy
329
+
330
+ options.apply_defaults timeout: @config.timeout,
331
+ metadata: @config.metadata,
332
+ retry_policy: @config.retry_policy
333
+
334
+ @access_approval_stub.get_approval_request request, options do |result, operation|
335
+ yield result, operation if block_given?
336
+ return result
337
+ end
338
+ rescue ::Gapic::Rest::Error => e
339
+ raise ::Google::Cloud::Error.from_error(e)
340
+ end
341
+
342
+ ##
343
+ # Approves a request and returns the updated ApprovalRequest.
344
+ #
345
+ # Returns NOT_FOUND if the request does not exist. Returns
346
+ # FAILED_PRECONDITION if the request exists but is not in a pending state.
347
+ #
348
+ # @overload approve_approval_request(request, options = nil)
349
+ # Pass arguments to `approve_approval_request` via a request object, either of type
350
+ # {::Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage} or an equivalent Hash.
351
+ #
352
+ # @param request [::Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage, ::Hash]
353
+ # A request object representing the call parameters. Required. To specify no
354
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
355
+ # @param options [::Gapic::CallOptions, ::Hash]
356
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
357
+ #
358
+ # @overload approve_approval_request(name: nil, expire_time: nil)
359
+ # Pass arguments to `approve_approval_request` via keyword arguments. Note that at
360
+ # least one keyword argument is required. To specify no parameters, or to keep all
361
+ # the default parameter values, pass an empty Hash as a request object (see above).
362
+ #
363
+ # @param name [::String]
364
+ # Name of the approval request to approve.
365
+ # @param expire_time [::Google::Protobuf::Timestamp, ::Hash]
366
+ # The expiration time of this approval.
367
+ # @yield [result, operation] Access the result along with the TransportOperation object
368
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
369
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
370
+ #
371
+ # @return [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
372
+ #
373
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
374
+ def approve_approval_request request, options = nil
375
+ raise ::ArgumentError, "request must be provided" if request.nil?
376
+
377
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage
378
+
379
+ # Converts hash and nil to an options object
380
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
381
+
382
+ # Customize the options with defaults
383
+ call_metadata = @config.rpcs.approve_approval_request.metadata.to_h
384
+
385
+ # Set x-goog-api-client and x-goog-user-project headers
386
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
387
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
388
+ gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION,
389
+ transports_version_send: [:rest]
390
+
391
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
392
+
393
+ options.apply_defaults timeout: @config.rpcs.approve_approval_request.timeout,
394
+ metadata: call_metadata,
395
+ retry_policy: @config.rpcs.approve_approval_request.retry_policy
396
+
397
+ options.apply_defaults timeout: @config.timeout,
398
+ metadata: @config.metadata,
399
+ retry_policy: @config.retry_policy
400
+
401
+ @access_approval_stub.approve_approval_request request, options do |result, operation|
402
+ yield result, operation if block_given?
403
+ return result
404
+ end
405
+ rescue ::Gapic::Rest::Error => e
406
+ raise ::Google::Cloud::Error.from_error(e)
407
+ end
408
+
409
+ ##
410
+ # Dismisses a request. Returns the updated ApprovalRequest.
411
+ #
412
+ # NOTE: This does not deny access to the resource if another request has been
413
+ # made and approved. It is equivalent in effect to ignoring the request
414
+ # altogether.
415
+ #
416
+ # Returns NOT_FOUND if the request does not exist.
417
+ #
418
+ # Returns FAILED_PRECONDITION if the request exists but is not in a pending
419
+ # state.
420
+ #
421
+ # @overload dismiss_approval_request(request, options = nil)
422
+ # Pass arguments to `dismiss_approval_request` via a request object, either of type
423
+ # {::Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage} or an equivalent Hash.
424
+ #
425
+ # @param request [::Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage, ::Hash]
426
+ # A request object representing the call parameters. Required. To specify no
427
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
428
+ # @param options [::Gapic::CallOptions, ::Hash]
429
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
430
+ #
431
+ # @overload dismiss_approval_request(name: nil)
432
+ # Pass arguments to `dismiss_approval_request` via keyword arguments. Note that at
433
+ # least one keyword argument is required. To specify no parameters, or to keep all
434
+ # the default parameter values, pass an empty Hash as a request object (see above).
435
+ #
436
+ # @param name [::String]
437
+ # Name of the ApprovalRequest to dismiss.
438
+ # @yield [result, operation] Access the result along with the TransportOperation object
439
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
440
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
441
+ #
442
+ # @return [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
443
+ #
444
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
445
+ def dismiss_approval_request request, options = nil
446
+ raise ::ArgumentError, "request must be provided" if request.nil?
447
+
448
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage
449
+
450
+ # Converts hash and nil to an options object
451
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
452
+
453
+ # Customize the options with defaults
454
+ call_metadata = @config.rpcs.dismiss_approval_request.metadata.to_h
455
+
456
+ # Set x-goog-api-client and x-goog-user-project headers
457
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
458
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
459
+ gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION,
460
+ transports_version_send: [:rest]
461
+
462
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
463
+
464
+ options.apply_defaults timeout: @config.rpcs.dismiss_approval_request.timeout,
465
+ metadata: call_metadata,
466
+ retry_policy: @config.rpcs.dismiss_approval_request.retry_policy
467
+
468
+ options.apply_defaults timeout: @config.timeout,
469
+ metadata: @config.metadata,
470
+ retry_policy: @config.retry_policy
471
+
472
+ @access_approval_stub.dismiss_approval_request request, options do |result, operation|
473
+ yield result, operation if block_given?
474
+ return result
475
+ end
476
+ rescue ::Gapic::Rest::Error => e
477
+ raise ::Google::Cloud::Error.from_error(e)
478
+ end
479
+
480
+ ##
481
+ # Invalidates an existing ApprovalRequest. Returns the updated
482
+ # ApprovalRequest.
483
+ #
484
+ # NOTE: This does not deny access to the resource if another request has been
485
+ # made and approved. It only invalidates a single approval.
486
+ #
487
+ # Returns FAILED_PRECONDITION if the request exists but is not in an approved
488
+ # state.
489
+ #
490
+ # @overload invalidate_approval_request(request, options = nil)
491
+ # Pass arguments to `invalidate_approval_request` via a request object, either of type
492
+ # {::Google::Cloud::AccessApproval::V1::InvalidateApprovalRequestMessage} or an equivalent Hash.
493
+ #
494
+ # @param request [::Google::Cloud::AccessApproval::V1::InvalidateApprovalRequestMessage, ::Hash]
495
+ # A request object representing the call parameters. Required. To specify no
496
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
497
+ # @param options [::Gapic::CallOptions, ::Hash]
498
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
499
+ #
500
+ # @overload invalidate_approval_request(name: nil)
501
+ # Pass arguments to `invalidate_approval_request` via keyword arguments. Note that at
502
+ # least one keyword argument is required. To specify no parameters, or to keep all
503
+ # the default parameter values, pass an empty Hash as a request object (see above).
504
+ #
505
+ # @param name [::String]
506
+ # Name of the ApprovalRequest to invalidate.
507
+ # @yield [result, operation] Access the result along with the TransportOperation object
508
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
509
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
510
+ #
511
+ # @return [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
512
+ #
513
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
514
+ def invalidate_approval_request request, options = nil
515
+ raise ::ArgumentError, "request must be provided" if request.nil?
516
+
517
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::InvalidateApprovalRequestMessage
518
+
519
+ # Converts hash and nil to an options object
520
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
521
+
522
+ # Customize the options with defaults
523
+ call_metadata = @config.rpcs.invalidate_approval_request.metadata.to_h
524
+
525
+ # Set x-goog-api-client and x-goog-user-project headers
526
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
527
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
528
+ gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION,
529
+ transports_version_send: [:rest]
530
+
531
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
532
+
533
+ options.apply_defaults timeout: @config.rpcs.invalidate_approval_request.timeout,
534
+ metadata: call_metadata,
535
+ retry_policy: @config.rpcs.invalidate_approval_request.retry_policy
536
+
537
+ options.apply_defaults timeout: @config.timeout,
538
+ metadata: @config.metadata,
539
+ retry_policy: @config.retry_policy
540
+
541
+ @access_approval_stub.invalidate_approval_request request, options do |result, operation|
542
+ yield result, operation if block_given?
543
+ return result
544
+ end
545
+ rescue ::Gapic::Rest::Error => e
546
+ raise ::Google::Cloud::Error.from_error(e)
547
+ end
548
+
549
+ ##
550
+ # Gets the settings associated with a project, folder, or organization.
551
+ #
552
+ # @overload get_access_approval_settings(request, options = nil)
553
+ # Pass arguments to `get_access_approval_settings` via a request object, either of type
554
+ # {::Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage} or an equivalent Hash.
555
+ #
556
+ # @param request [::Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage, ::Hash]
557
+ # A request object representing the call parameters. Required. To specify no
558
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
559
+ # @param options [::Gapic::CallOptions, ::Hash]
560
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
561
+ #
562
+ # @overload get_access_approval_settings(name: nil)
563
+ # Pass arguments to `get_access_approval_settings` via keyword arguments. Note that at
564
+ # least one keyword argument is required. To specify no parameters, or to keep all
565
+ # the default parameter values, pass an empty Hash as a request object (see above).
566
+ #
567
+ # @param name [::String]
568
+ # The name of the AccessApprovalSettings to retrieve.
569
+ # Format: "\\{projects|folders|organizations}/\\{id}/accessApprovalSettings"
570
+ # @yield [result, operation] Access the result along with the TransportOperation object
571
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
572
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
573
+ #
574
+ # @return [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
575
+ #
576
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
577
+ def get_access_approval_settings request, options = nil
578
+ raise ::ArgumentError, "request must be provided" if request.nil?
579
+
580
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage
581
+
582
+ # Converts hash and nil to an options object
583
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
584
+
585
+ # Customize the options with defaults
586
+ call_metadata = @config.rpcs.get_access_approval_settings.metadata.to_h
587
+
588
+ # Set x-goog-api-client and x-goog-user-project headers
589
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
590
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
591
+ gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION,
592
+ transports_version_send: [:rest]
593
+
594
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
595
+
596
+ options.apply_defaults timeout: @config.rpcs.get_access_approval_settings.timeout,
597
+ metadata: call_metadata,
598
+ retry_policy: @config.rpcs.get_access_approval_settings.retry_policy
599
+
600
+ options.apply_defaults timeout: @config.timeout,
601
+ metadata: @config.metadata,
602
+ retry_policy: @config.retry_policy
603
+
604
+ @access_approval_stub.get_access_approval_settings request, options do |result, operation|
605
+ yield result, operation if block_given?
606
+ return result
607
+ end
608
+ rescue ::Gapic::Rest::Error => e
609
+ raise ::Google::Cloud::Error.from_error(e)
610
+ end
611
+
612
+ ##
613
+ # Updates the settings associated with a project, folder, or organization.
614
+ # Settings to update are determined by the value of field_mask.
615
+ #
616
+ # @overload update_access_approval_settings(request, options = nil)
617
+ # Pass arguments to `update_access_approval_settings` via a request object, either of type
618
+ # {::Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage} or an equivalent Hash.
619
+ #
620
+ # @param request [::Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage, ::Hash]
621
+ # A request object representing the call parameters. Required. To specify no
622
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
623
+ # @param options [::Gapic::CallOptions, ::Hash]
624
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
625
+ #
626
+ # @overload update_access_approval_settings(settings: nil, update_mask: nil)
627
+ # Pass arguments to `update_access_approval_settings` via keyword arguments. Note that at
628
+ # least one keyword argument is required. To specify no parameters, or to keep all
629
+ # the default parameter values, pass an empty Hash as a request object (see above).
630
+ #
631
+ # @param settings [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings, ::Hash]
632
+ # The new AccessApprovalSettings.
633
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
634
+ # The update mask applies to the settings. Only the top level fields of
635
+ # AccessApprovalSettings (notification_emails & enrolled_services) are
636
+ # supported. For each field, if it is included, the currently stored value
637
+ # will be entirely overwritten with the value of the field passed in this
638
+ # request.
639
+ #
640
+ # For the `FieldMask` definition, see
641
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
642
+ # If this field is left unset, only the notification_emails field will be
643
+ # updated.
644
+ # @yield [result, operation] Access the result along with the TransportOperation object
645
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
646
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
647
+ #
648
+ # @return [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
649
+ #
650
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
651
+ def update_access_approval_settings request, options = nil
652
+ raise ::ArgumentError, "request must be provided" if request.nil?
653
+
654
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage
655
+
656
+ # Converts hash and nil to an options object
657
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
658
+
659
+ # Customize the options with defaults
660
+ call_metadata = @config.rpcs.update_access_approval_settings.metadata.to_h
661
+
662
+ # Set x-goog-api-client and x-goog-user-project headers
663
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
664
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
665
+ gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION,
666
+ transports_version_send: [:rest]
667
+
668
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
669
+
670
+ options.apply_defaults timeout: @config.rpcs.update_access_approval_settings.timeout,
671
+ metadata: call_metadata,
672
+ retry_policy: @config.rpcs.update_access_approval_settings.retry_policy
673
+
674
+ options.apply_defaults timeout: @config.timeout,
675
+ metadata: @config.metadata,
676
+ retry_policy: @config.retry_policy
677
+
678
+ @access_approval_stub.update_access_approval_settings request, options do |result, operation|
679
+ yield result, operation if block_given?
680
+ return result
681
+ end
682
+ rescue ::Gapic::Rest::Error => e
683
+ raise ::Google::Cloud::Error.from_error(e)
684
+ end
685
+
686
+ ##
687
+ # Deletes the settings associated with a project, folder, or organization.
688
+ # This will have the effect of disabling Access Approval for the project,
689
+ # folder, or organization, but only if all ancestors also have Access
690
+ # Approval disabled. If Access Approval is enabled at a higher level of the
691
+ # hierarchy, then Access Approval will still be enabled at this level as
692
+ # the settings are inherited.
693
+ #
694
+ # @overload delete_access_approval_settings(request, options = nil)
695
+ # Pass arguments to `delete_access_approval_settings` via a request object, either of type
696
+ # {::Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage} or an equivalent Hash.
697
+ #
698
+ # @param request [::Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage, ::Hash]
699
+ # A request object representing the call parameters. Required. To specify no
700
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
701
+ # @param options [::Gapic::CallOptions, ::Hash]
702
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
703
+ #
704
+ # @overload delete_access_approval_settings(name: nil)
705
+ # Pass arguments to `delete_access_approval_settings` via keyword arguments. Note that at
706
+ # least one keyword argument is required. To specify no parameters, or to keep all
707
+ # the default parameter values, pass an empty Hash as a request object (see above).
708
+ #
709
+ # @param name [::String]
710
+ # Name of the AccessApprovalSettings to delete.
711
+ # @yield [result, operation] Access the result along with the TransportOperation object
712
+ # @yieldparam result [::Google::Protobuf::Empty]
713
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
714
+ #
715
+ # @return [::Google::Protobuf::Empty]
716
+ #
717
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
718
+ def delete_access_approval_settings request, options = nil
719
+ raise ::ArgumentError, "request must be provided" if request.nil?
720
+
721
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage
722
+
723
+ # Converts hash and nil to an options object
724
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
725
+
726
+ # Customize the options with defaults
727
+ call_metadata = @config.rpcs.delete_access_approval_settings.metadata.to_h
728
+
729
+ # Set x-goog-api-client and x-goog-user-project headers
730
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
731
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
732
+ gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION,
733
+ transports_version_send: [:rest]
734
+
735
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
736
+
737
+ options.apply_defaults timeout: @config.rpcs.delete_access_approval_settings.timeout,
738
+ metadata: call_metadata,
739
+ retry_policy: @config.rpcs.delete_access_approval_settings.retry_policy
740
+
741
+ options.apply_defaults timeout: @config.timeout,
742
+ metadata: @config.metadata,
743
+ retry_policy: @config.retry_policy
744
+
745
+ @access_approval_stub.delete_access_approval_settings request, options do |result, operation|
746
+ yield result, operation if block_given?
747
+ return result
748
+ end
749
+ rescue ::Gapic::Rest::Error => e
750
+ raise ::Google::Cloud::Error.from_error(e)
751
+ end
752
+
753
+ ##
754
+ # Retrieves the service account that is used by Access Approval to access KMS
755
+ # keys for signing approved approval requests.
756
+ #
757
+ # @overload get_access_approval_service_account(request, options = nil)
758
+ # Pass arguments to `get_access_approval_service_account` via a request object, either of type
759
+ # {::Google::Cloud::AccessApproval::V1::GetAccessApprovalServiceAccountMessage} or an equivalent Hash.
760
+ #
761
+ # @param request [::Google::Cloud::AccessApproval::V1::GetAccessApprovalServiceAccountMessage, ::Hash]
762
+ # A request object representing the call parameters. Required. To specify no
763
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
764
+ # @param options [::Gapic::CallOptions, ::Hash]
765
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
766
+ #
767
+ # @overload get_access_approval_service_account(name: nil)
768
+ # Pass arguments to `get_access_approval_service_account` via keyword arguments. Note that at
769
+ # least one keyword argument is required. To specify no parameters, or to keep all
770
+ # the default parameter values, pass an empty Hash as a request object (see above).
771
+ #
772
+ # @param name [::String]
773
+ # Name of the AccessApprovalServiceAccount to retrieve.
774
+ # @yield [result, operation] Access the result along with the TransportOperation object
775
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::AccessApprovalServiceAccount]
776
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
777
+ #
778
+ # @return [::Google::Cloud::AccessApproval::V1::AccessApprovalServiceAccount]
779
+ #
780
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
781
+ def get_access_approval_service_account request, options = nil
782
+ raise ::ArgumentError, "request must be provided" if request.nil?
783
+
784
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::GetAccessApprovalServiceAccountMessage
785
+
786
+ # Converts hash and nil to an options object
787
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
788
+
789
+ # Customize the options with defaults
790
+ call_metadata = @config.rpcs.get_access_approval_service_account.metadata.to_h
791
+
792
+ # Set x-goog-api-client and x-goog-user-project headers
793
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
794
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
795
+ gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION,
796
+ transports_version_send: [:rest]
797
+
798
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
799
+
800
+ options.apply_defaults timeout: @config.rpcs.get_access_approval_service_account.timeout,
801
+ metadata: call_metadata,
802
+ retry_policy: @config.rpcs.get_access_approval_service_account.retry_policy
803
+
804
+ options.apply_defaults timeout: @config.timeout,
805
+ metadata: @config.metadata,
806
+ retry_policy: @config.retry_policy
807
+
808
+ @access_approval_stub.get_access_approval_service_account request, options do |result, operation|
809
+ yield result, operation if block_given?
810
+ return result
811
+ end
812
+ rescue ::Gapic::Rest::Error => e
813
+ raise ::Google::Cloud::Error.from_error(e)
814
+ end
815
+
816
+ ##
817
+ # Configuration class for the AccessApproval REST API.
818
+ #
819
+ # This class represents the configuration for AccessApproval REST,
820
+ # providing control over timeouts, retry behavior, logging, transport
821
+ # parameters, and other low-level controls. Certain parameters can also be
822
+ # applied individually to specific RPCs. See
823
+ # {::Google::Cloud::AccessApproval::V1::AccessApproval::Rest::Client::Configuration::Rpcs}
824
+ # for a list of RPCs that can be configured independently.
825
+ #
826
+ # Configuration can be applied globally to all clients, or to a single client
827
+ # on construction.
828
+ #
829
+ # @example
830
+ #
831
+ # # Modify the global config, setting the timeout for
832
+ # # list_approval_requests to 20 seconds,
833
+ # # and all remaining timeouts to 10 seconds.
834
+ # ::Google::Cloud::AccessApproval::V1::AccessApproval::Rest::Client.configure do |config|
835
+ # config.timeout = 10.0
836
+ # config.rpcs.list_approval_requests.timeout = 20.0
837
+ # end
838
+ #
839
+ # # Apply the above configuration only to a new client.
840
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Rest::Client.new do |config|
841
+ # config.timeout = 10.0
842
+ # config.rpcs.list_approval_requests.timeout = 20.0
843
+ # end
844
+ #
845
+ # @!attribute [rw] endpoint
846
+ # The hostname or hostname:port of the service endpoint.
847
+ # Defaults to `"accessapproval.googleapis.com"`.
848
+ # @return [::String]
849
+ # @!attribute [rw] credentials
850
+ # Credentials to send with calls. You may provide any of the following types:
851
+ # * (`String`) The path to a service account key file in JSON format
852
+ # * (`Hash`) A service account key as a Hash
853
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
854
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
855
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
856
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
857
+ # * (`nil`) indicating no credentials
858
+ # @return [::Object]
859
+ # @!attribute [rw] scope
860
+ # The OAuth scopes
861
+ # @return [::Array<::String>]
862
+ # @!attribute [rw] lib_name
863
+ # The library name as recorded in instrumentation and logging
864
+ # @return [::String]
865
+ # @!attribute [rw] lib_version
866
+ # The library version as recorded in instrumentation and logging
867
+ # @return [::String]
868
+ # @!attribute [rw] timeout
869
+ # The call timeout in seconds.
870
+ # @return [::Numeric]
871
+ # @!attribute [rw] metadata
872
+ # Additional headers to be sent with the call.
873
+ # @return [::Hash{::Symbol=>::String}]
874
+ # @!attribute [rw] retry_policy
875
+ # The retry policy. The value is a hash with the following keys:
876
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
877
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
878
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
879
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
880
+ # trigger a retry.
881
+ # @return [::Hash]
882
+ # @!attribute [rw] quota_project
883
+ # A separate project against which to charge quota.
884
+ # @return [::String]
885
+ #
886
+ class Configuration
887
+ extend ::Gapic::Config
888
+
889
+ DEFAULT_ENDPOINT = "accessapproval.googleapis.com"
890
+
891
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
892
+ config_attr :credentials, nil do |value|
893
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
894
+ allowed.any? { |klass| klass === value }
895
+ end
896
+ config_attr :scope, nil, ::String, ::Array, nil
897
+ config_attr :lib_name, nil, ::String, nil
898
+ config_attr :lib_version, nil, ::String, nil
899
+ config_attr :timeout, nil, ::Numeric, nil
900
+ config_attr :metadata, nil, ::Hash, nil
901
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
902
+ config_attr :quota_project, nil, ::String, nil
903
+
904
+ # @private
905
+ def initialize parent_config = nil
906
+ @parent_config = parent_config unless parent_config.nil?
907
+
908
+ yield self if block_given?
909
+ end
910
+
911
+ ##
912
+ # Configurations for individual RPCs
913
+ # @return [Rpcs]
914
+ #
915
+ def rpcs
916
+ @rpcs ||= begin
917
+ parent_rpcs = nil
918
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
919
+ Rpcs.new parent_rpcs
920
+ end
921
+ end
922
+
923
+ ##
924
+ # Configuration RPC class for the AccessApproval API.
925
+ #
926
+ # Includes fields providing the configuration for each RPC in this service.
927
+ # Each configuration object is of type `Gapic::Config::Method` and includes
928
+ # the following configuration fields:
929
+ #
930
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
931
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
932
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
933
+ # include the following keys:
934
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
935
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
936
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
937
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
938
+ # trigger a retry.
939
+ #
940
+ class Rpcs
941
+ ##
942
+ # RPC-specific configuration for `list_approval_requests`
943
+ # @return [::Gapic::Config::Method]
944
+ #
945
+ attr_reader :list_approval_requests
946
+ ##
947
+ # RPC-specific configuration for `get_approval_request`
948
+ # @return [::Gapic::Config::Method]
949
+ #
950
+ attr_reader :get_approval_request
951
+ ##
952
+ # RPC-specific configuration for `approve_approval_request`
953
+ # @return [::Gapic::Config::Method]
954
+ #
955
+ attr_reader :approve_approval_request
956
+ ##
957
+ # RPC-specific configuration for `dismiss_approval_request`
958
+ # @return [::Gapic::Config::Method]
959
+ #
960
+ attr_reader :dismiss_approval_request
961
+ ##
962
+ # RPC-specific configuration for `invalidate_approval_request`
963
+ # @return [::Gapic::Config::Method]
964
+ #
965
+ attr_reader :invalidate_approval_request
966
+ ##
967
+ # RPC-specific configuration for `get_access_approval_settings`
968
+ # @return [::Gapic::Config::Method]
969
+ #
970
+ attr_reader :get_access_approval_settings
971
+ ##
972
+ # RPC-specific configuration for `update_access_approval_settings`
973
+ # @return [::Gapic::Config::Method]
974
+ #
975
+ attr_reader :update_access_approval_settings
976
+ ##
977
+ # RPC-specific configuration for `delete_access_approval_settings`
978
+ # @return [::Gapic::Config::Method]
979
+ #
980
+ attr_reader :delete_access_approval_settings
981
+ ##
982
+ # RPC-specific configuration for `get_access_approval_service_account`
983
+ # @return [::Gapic::Config::Method]
984
+ #
985
+ attr_reader :get_access_approval_service_account
986
+
987
+ # @private
988
+ def initialize parent_rpcs = nil
989
+ list_approval_requests_config = parent_rpcs.list_approval_requests if parent_rpcs.respond_to? :list_approval_requests
990
+ @list_approval_requests = ::Gapic::Config::Method.new list_approval_requests_config
991
+ get_approval_request_config = parent_rpcs.get_approval_request if parent_rpcs.respond_to? :get_approval_request
992
+ @get_approval_request = ::Gapic::Config::Method.new get_approval_request_config
993
+ approve_approval_request_config = parent_rpcs.approve_approval_request if parent_rpcs.respond_to? :approve_approval_request
994
+ @approve_approval_request = ::Gapic::Config::Method.new approve_approval_request_config
995
+ dismiss_approval_request_config = parent_rpcs.dismiss_approval_request if parent_rpcs.respond_to? :dismiss_approval_request
996
+ @dismiss_approval_request = ::Gapic::Config::Method.new dismiss_approval_request_config
997
+ invalidate_approval_request_config = parent_rpcs.invalidate_approval_request if parent_rpcs.respond_to? :invalidate_approval_request
998
+ @invalidate_approval_request = ::Gapic::Config::Method.new invalidate_approval_request_config
999
+ get_access_approval_settings_config = parent_rpcs.get_access_approval_settings if parent_rpcs.respond_to? :get_access_approval_settings
1000
+ @get_access_approval_settings = ::Gapic::Config::Method.new get_access_approval_settings_config
1001
+ update_access_approval_settings_config = parent_rpcs.update_access_approval_settings if parent_rpcs.respond_to? :update_access_approval_settings
1002
+ @update_access_approval_settings = ::Gapic::Config::Method.new update_access_approval_settings_config
1003
+ delete_access_approval_settings_config = parent_rpcs.delete_access_approval_settings if parent_rpcs.respond_to? :delete_access_approval_settings
1004
+ @delete_access_approval_settings = ::Gapic::Config::Method.new delete_access_approval_settings_config
1005
+ get_access_approval_service_account_config = parent_rpcs.get_access_approval_service_account if parent_rpcs.respond_to? :get_access_approval_service_account
1006
+ @get_access_approval_service_account = ::Gapic::Config::Method.new get_access_approval_service_account_config
1007
+
1008
+ yield self if block_given?
1009
+ end
1010
+ end
1011
+ end
1012
+ end
1013
+ end
1014
+ end
1015
+ end
1016
+ end
1017
+ end
1018
+ end