google-cloud-access_approval-v1 0.1.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43913d050bd9711b88a0c10bea0236be8fef506ce56fab2e9f09232e04c88205
4
- data.tar.gz: 173206f152f0d8e7362220d3947814b7f187bc3c431da24c228e70fb801bc002
3
+ metadata.gz: b744f41cfece9def1a5fa5ddbb74f0379893578fee58149d75691a597d32f07f
4
+ data.tar.gz: 9e8bace6854244a882706b0f807df96a336ed7a851e50267e4ada9020c7bdce9
5
5
  SHA512:
6
- metadata.gz: bb32ae106a63be9143f65f6807fcea901a8e3748997416d62a6e1d41666c494cf46cb23362c23a08b15726d6fb0b9d44e1106529b3a1c0ba902d24641e4be6dd
7
- data.tar.gz: fbfc1a7ff541032fe9784e16da9d3d55e6769d619db5712eb16ef5f46734aed79b621278efb51f684ad8f02aa34cfec9ebe2b1e4a0a78b3d1c49a1c8a01041d7
6
+ metadata.gz: ec021a7fe20652f00919f016f90a476d0fe61ab5934b74c6a7214a5ce5738746ec1e0bd5e1787d75e99fc4b7e6dad14bba75931e4deb6541b80b9cec083e01f1
7
+ data.tar.gz: d09f33553a79be468d1aa658000ca78c9b095c37956ef9520a6e76ba9f1495037892f89563122f0e5b6b2dee31ad6283cee2684d4571da4e1b907fe6857398d1
@@ -27,7 +27,7 @@ export ACCESS_APPROVAL_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/access_approval/v1"
29
29
 
30
- client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
30
+ client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
31
31
  ```
32
32
 
33
33
  ## Credential Lookup
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
64
64
 
65
65
  The environment variables that google-cloud-access_approval-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- {Google::Cloud::AccessApproval::V1::AccessApproval::Credentials}):
67
+ {::Google::Cloud::AccessApproval::V1::AccessApproval::Credentials}):
68
68
 
69
69
  1. `ACCESS_APPROVAL_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  2. `ACCESS_APPROVAL_KEYFILE` - Path to JSON file, or JSON contents
@@ -77,7 +77,7 @@ require "google/cloud/access_approval/v1"
77
77
 
78
78
  ENV["ACCESS_APPROVAL_CREDENTIALS"] = "path/to/keyfile.json"
79
79
 
80
- client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
80
+ client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
81
81
  ```
82
82
 
83
83
  ### Configuration
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
88
88
  ```ruby
89
89
  require "google/cloud/access_approval/v1"
90
90
 
91
- client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
91
+ client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
92
92
  config.credentials = "path/to/keyfile.json"
93
93
  end
94
94
  ```
@@ -98,11 +98,11 @@ Or configured globally for all clients:
98
98
  ```ruby
99
99
  require "google/cloud/access_approval/v1"
100
100
 
101
- Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
101
+ ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
102
102
  config.credentials = "path/to/keyfile.json"
103
103
  end
104
104
 
105
- client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
105
+ client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
106
106
  ```
107
107
 
108
108
  ### Cloud SDK
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Access Approval API V1
1
+ # Ruby Client for the Access Approval API V1 API
2
2
 
3
3
  API Client library for the Access Approval API V1 API
4
4
 
@@ -12,6 +12,53 @@ https://github.com/googleapis/google-cloud-ruby
12
12
  $ gem install google-cloud-access_approval-v1
13
13
  ```
14
14
 
15
+ ## Before You Begin
16
+
17
+ In order to use this library, you first need to go through the following steps:
18
+
19
+ 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
+ 1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. {file:AUTHENTICATION.md Set up authentication.}
22
+
23
+ ## Quick Start
24
+
25
+ ```ruby
26
+ require "google/cloud/access_approval/v1"
27
+
28
+ client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
29
+ request = my_create_request
30
+ response = client.list_approval_requests request
31
+ ```
32
+
33
+ View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-access_approval-v1/latest)
34
+ for class and method documentation.
35
+
36
+ ## Enabling Logging
37
+
38
+ To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
39
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
40
+ or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
41
+ that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
42
+ and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
43
+
44
+ Configuring a Ruby stdlib logger:
45
+
46
+ ```ruby
47
+ require "logger"
48
+
49
+ module MyLogger
50
+ LOGGER = Logger.new $stderr, level: Logger::WARN
51
+ def logger
52
+ LOGGER
53
+ end
54
+ end
55
+
56
+ # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
57
+ module GRPC
58
+ extend MyLogger
59
+ end
60
+ ```
61
+
15
62
  ## Supported Ruby Versions
16
63
 
17
64
  This library is supported on Ruby 2.4+.
@@ -1 +1,21 @@
1
- require "google/cloud/access_approval/v1/version"
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/cloud/access_approval/v1"
@@ -17,3 +17,19 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/access_approval/v1/access_approval"
20
+ require "google/cloud/access_approval/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module AccessApproval
25
+ ##
26
+ # To load this package, including all its services, and instantiate a client:
27
+ #
28
+ # require "google/cloud/access_approval/v1"
29
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
30
+ #
31
+ module V1
32
+ end
33
+ end
34
+ end
35
+ end
@@ -16,5 +16,65 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "google/cloud/access_approval/v1/access_approval/client"
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/access_approval/v1/version"
24
+
20
25
  require "google/cloud/access_approval/v1/access_approval/credentials"
26
+ require "google/cloud/access_approval/v1/access_approval/client"
27
+
28
+ module Google
29
+ module Cloud
30
+ module AccessApproval
31
+ module V1
32
+ ##
33
+ # This API allows a customer to manage accesses to cloud resources by
34
+ # Google personnel. It defines the following resource model:
35
+ #
36
+ # - The API has a collection of
37
+ # {::Google::Cloud::AccessApproval::V1::ApprovalRequest ApprovalRequest}
38
+ # resources, named `approvalRequests/{approval_request_id}`
39
+ # - The API has top-level settings per Project/Folder/Organization, named
40
+ # `accessApprovalSettings`
41
+ #
42
+ # The service also periodically emails a list of recipients, defined at the
43
+ # Project/Folder/Organization level in the accessApprovalSettings, when there
44
+ # is a pending ApprovalRequest for them to act on. The ApprovalRequests can
45
+ # also optionally be published to a Cloud Pub/Sub topic owned by the customer
46
+ # (for Beta, the Pub/Sub setup is managed manually).
47
+ #
48
+ # ApprovalRequests can be approved or dismissed. Google personel can only
49
+ # access the indicated resource or resources if the request is approved
50
+ # (subject to some exclusions:
51
+ # https://cloud.google.com/access-approval/docs/overview#exclusions).
52
+ #
53
+ # Note: Using Access Approval functionality will mean that Google may not be
54
+ # able to meet the SLAs for your chosen products, as any support response times
55
+ # may be dramatically increased. As such the SLAs do not apply to any service
56
+ # disruption to the extent impacted by Customer's use of Access Approval. Do
57
+ # not enable Access Approval for projects where you may require high service
58
+ # availability and rapid response by Google Cloud Support.
59
+ #
60
+ # After a request is approved or dismissed, no further action may be taken on
61
+ # it. Requests with the requested_expiration in the past or with no activity
62
+ # for 14 days are considered dismissed. When an approval expires, the request
63
+ # is considered dismissed.
64
+ #
65
+ # If a request is not approved or dismissed, we call it pending.
66
+ #
67
+ # To load this service and instantiate a client:
68
+ #
69
+ # require "google/cloud/access_approval/v1/access_approval"
70
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
71
+ #
72
+ module AccessApproval
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end
78
+
79
+ helper_path = ::File.join __dir__, "access_approval", "helpers.rb"
80
+ require "google/cloud/access_approval/v1/access_approval/helpers" if ::File.file? helper_path
@@ -16,14 +16,8 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "gapic/common"
20
- require "gapic/config"
21
- require "gapic/config/method"
22
-
23
19
  require "google/cloud/errors"
24
- require "google/cloud/access_approval/v1/version"
25
20
  require "google/cloud/accessapproval/v1/accessapproval_pb"
26
- require "google/cloud/access_approval/v1/access_approval/credentials"
27
21
 
28
22
  module Google
29
23
  module Cloud
@@ -37,7 +31,7 @@ module Google
37
31
  # Google personnel. It defines the following resource model:
38
32
  #
39
33
  # - The API has a collection of
40
- # {Google::Cloud::AccessApproval::V1::ApprovalRequest ApprovalRequest}
34
+ # {::Google::Cloud::AccessApproval::V1::ApprovalRequest ApprovalRequest}
41
35
  # resources, named `approvalRequests/{approval_request_id}`
42
36
  # - The API has top-level settings per Project/Folder/Organization, named
43
37
  # `accessApprovalSettings`
@@ -74,15 +68,15 @@ module Google
74
68
  ##
75
69
  # Configure the AccessApproval Client class.
76
70
  #
77
- # See {Google::Cloud::AccessApproval::V1::AccessApproval::Client::Configuration}
71
+ # See {::Google::Cloud::AccessApproval::V1::AccessApproval::Client::Configuration}
78
72
  # for a description of the configuration fields.
79
73
  #
80
74
  # ## Example
81
75
  #
82
76
  # To modify the configuration for all AccessApproval clients:
83
77
  #
84
- # Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
85
- # config.timeout = 10_000
78
+ # ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
79
+ # config.timeout = 10.0
86
80
  # end
87
81
  #
88
82
  # @yield [config] Configure the Client client.
@@ -114,7 +108,7 @@ module Google
114
108
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
115
109
  # should be made on {Client.configure}.
116
110
  #
117
- # See {Google::Cloud::AccessApproval::V1::AccessApproval::Client::Configuration}
111
+ # See {::Google::Cloud::AccessApproval::V1::AccessApproval::Client::Configuration}
118
112
  # for a description of the configuration fields.
119
113
  #
120
114
  # @yield [config] Configure the Client client.
@@ -135,13 +129,13 @@ module Google
135
129
  # To create a new AccessApproval client with the default
136
130
  # configuration:
137
131
  #
138
- # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
132
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
139
133
  #
140
134
  # To create a new AccessApproval client with a custom
141
135
  # configuration:
142
136
  #
143
- # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
144
- # config.timeout = 10_000
137
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
138
+ # config.timeout = 10.0
145
139
  # end
146
140
  #
147
141
  # @yield [config] Configure the AccessApproval client.
@@ -166,10 +160,11 @@ module Google
166
160
  if credentials.is_a?(String) || credentials.is_a?(Hash)
167
161
  credentials = Credentials.new credentials, scope: @config.scope
168
162
  end
169
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
163
+ @quota_project_id = @config.quota_project
164
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
170
165
 
171
- @access_approval_stub = Gapic::ServiceStub.new(
172
- Google::Cloud::AccessApproval::V1::AccessApproval::Stub,
166
+ @access_approval_stub = ::Gapic::ServiceStub.new(
167
+ ::Google::Cloud::AccessApproval::V1::AccessApproval::Stub,
173
168
  credentials: credentials,
174
169
  endpoint: @config.endpoint,
175
170
  channel_args: @config.channel_args,
@@ -185,18 +180,24 @@ module Google
185
180
  # The order is reverse chronological.
186
181
  #
187
182
  # @overload list_approval_requests(request, options = nil)
188
- # @param request [Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage | Hash]
189
- # Lists approval requests associated with a project, folder, or organization.
190
- # Approval requests can be filtered by state (pending, active, dismissed).
191
- # The order is reverse chronological.
192
- # @param options [Gapic::CallOptions, Hash]
183
+ # Pass arguments to `list_approval_requests` via a request object, either of type
184
+ # {::Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage} or an equivalent Hash.
185
+ #
186
+ # @param request [::Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage, ::Hash]
187
+ # A request object representing the call parameters. Required. To specify no
188
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
189
+ # @param options [::Gapic::CallOptions, ::Hash]
193
190
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
194
191
  #
195
192
  # @overload list_approval_requests(parent: nil, filter: nil, page_size: nil, page_token: nil)
196
- # @param parent [String]
193
+ # Pass arguments to `list_approval_requests` via keyword arguments. Note that at
194
+ # least one keyword argument is required. To specify no parameters, or to keep all
195
+ # the default parameter values, pass an empty Hash as a request object (see above).
196
+ #
197
+ # @param parent [::String]
197
198
  # The parent resource. This may be "projects/\\{project_id}",
198
199
  # "folders/\\{folder_id}", or "organizations/\\{organization_id}".
199
- # @param filter [String]
200
+ # @param filter [::String]
200
201
  # A filter on the type of approval requests to retrieve. Must be one of the
201
202
  # following values:
202
203
  # <ol>
@@ -206,33 +207,32 @@ module Google
206
207
  # <li>ACTIVE: Only active (i.e. currently approved) requests.</li>
207
208
  # <li>DISMISSED: Only dismissed (including expired) requests.</li>
208
209
  # </ol>
209
- # @param page_size [Integer]
210
+ # @param page_size [::Integer]
210
211
  # Requested page size.
211
- # @param page_token [String]
212
+ # @param page_token [::String]
212
213
  # A token identifying the page of results to return.
213
214
  #
214
- #
215
215
  # @yield [response, operation] Access the result along with the RPC operation
216
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::AccessApproval::V1::ApprovalRequest>]
217
- # @yieldparam operation [GRPC::ActiveCall::Operation]
216
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AccessApproval::V1::ApprovalRequest>]
217
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
218
218
  #
219
- # @return [Gapic::PagedEnumerable<Google::Cloud::AccessApproval::V1::ApprovalRequest>]
219
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::AccessApproval::V1::ApprovalRequest>]
220
220
  #
221
- # @raise [Google::Cloud::Error] if the RPC is aborted.
221
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
222
222
  #
223
223
  def list_approval_requests request, options = nil
224
- raise ArgumentError, "request must be provided" if request.nil?
224
+ raise ::ArgumentError, "request must be provided" if request.nil?
225
225
 
226
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage
226
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage
227
227
 
228
228
  # Converts hash and nil to an options object
229
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
229
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
230
230
 
231
231
  # Customize the options with defaults
232
232
  metadata = @config.rpcs.list_approval_requests.metadata.to_h
233
233
 
234
234
  # Set x-goog-api-client and x-goog-user-project headers
235
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
235
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
236
236
  lib_name: @config.lib_name, lib_version: @config.lib_version,
237
237
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
238
238
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -250,49 +250,56 @@ module Google
250
250
  retry_policy: @config.retry_policy
251
251
 
252
252
  @access_approval_stub.call_rpc :list_approval_requests, request, options: options do |response, operation|
253
- response = Gapic::PagedEnumerable.new @access_approval_stub, :list_approval_requests, request, response, operation, options
253
+ response = ::Gapic::PagedEnumerable.new @access_approval_stub, :list_approval_requests, request, response, operation, options
254
254
  yield response, operation if block_given?
255
255
  return response
256
256
  end
257
- rescue GRPC::BadStatus => e
258
- raise Google::Cloud::Error.from_error(e)
257
+ rescue ::GRPC::BadStatus => e
258
+ raise ::Google::Cloud::Error.from_error(e)
259
259
  end
260
260
 
261
261
  ##
262
262
  # Gets an approval request. Returns NOT_FOUND if the request does not exist.
263
263
  #
264
264
  # @overload get_approval_request(request, options = nil)
265
- # @param request [Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage | Hash]
266
- # Gets an approval request. Returns NOT_FOUND if the request does not exist.
267
- # @param options [Gapic::CallOptions, Hash]
265
+ # Pass arguments to `get_approval_request` via a request object, either of type
266
+ # {::Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage} or an equivalent Hash.
267
+ #
268
+ # @param request [::Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage, ::Hash]
269
+ # A request object representing the call parameters. Required. To specify no
270
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
271
+ # @param options [::Gapic::CallOptions, ::Hash]
268
272
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
269
273
  #
270
274
  # @overload get_approval_request(name: nil)
271
- # @param name [String]
272
- # Name of the approval request to retrieve.
275
+ # Pass arguments to `get_approval_request` via keyword arguments. Note that at
276
+ # least one keyword argument is required. To specify no parameters, or to keep all
277
+ # the default parameter values, pass an empty Hash as a request object (see above).
273
278
  #
279
+ # @param name [::String]
280
+ # Name of the approval request to retrieve.
274
281
  #
275
282
  # @yield [response, operation] Access the result along with the RPC operation
276
- # @yieldparam response [Google::Cloud::AccessApproval::V1::ApprovalRequest]
277
- # @yieldparam operation [GRPC::ActiveCall::Operation]
283
+ # @yieldparam response [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
284
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
278
285
  #
279
- # @return [Google::Cloud::AccessApproval::V1::ApprovalRequest]
286
+ # @return [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
280
287
  #
281
- # @raise [Google::Cloud::Error] if the RPC is aborted.
288
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
282
289
  #
283
290
  def get_approval_request request, options = nil
284
- raise ArgumentError, "request must be provided" if request.nil?
291
+ raise ::ArgumentError, "request must be provided" if request.nil?
285
292
 
286
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage
293
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage
287
294
 
288
295
  # Converts hash and nil to an options object
289
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
296
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
290
297
 
291
298
  # Customize the options with defaults
292
299
  metadata = @config.rpcs.get_approval_request.metadata.to_h
293
300
 
294
301
  # Set x-goog-api-client and x-goog-user-project headers
295
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
302
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
296
303
  lib_name: @config.lib_name, lib_version: @config.lib_version,
297
304
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
298
305
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -313,8 +320,8 @@ module Google
313
320
  yield response, operation if block_given?
314
321
  return response
315
322
  end
316
- rescue GRPC::BadStatus => e
317
- raise Google::Cloud::Error.from_error(e)
323
+ rescue ::GRPC::BadStatus => e
324
+ raise ::Google::Cloud::Error.from_error(e)
318
325
  end
319
326
 
320
327
  ##
@@ -324,42 +331,46 @@ module Google
324
331
  # FAILED_PRECONDITION if the request exists but is not in a pending state.
325
332
  #
326
333
  # @overload approve_approval_request(request, options = nil)
327
- # @param request [Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage | Hash]
328
- # Approves a request and returns the updated ApprovalRequest.
334
+ # Pass arguments to `approve_approval_request` via a request object, either of type
335
+ # {::Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage} or an equivalent Hash.
329
336
  #
330
- # Returns NOT_FOUND if the request does not exist. Returns
331
- # FAILED_PRECONDITION if the request exists but is not in a pending state.
332
- # @param options [Gapic::CallOptions, Hash]
337
+ # @param request [::Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage, ::Hash]
338
+ # A request object representing the call parameters. Required. To specify no
339
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
340
+ # @param options [::Gapic::CallOptions, ::Hash]
333
341
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
334
342
  #
335
343
  # @overload approve_approval_request(name: nil, expire_time: nil)
336
- # @param name [String]
344
+ # Pass arguments to `approve_approval_request` via keyword arguments. Note that at
345
+ # least one keyword argument is required. To specify no parameters, or to keep all
346
+ # the default parameter values, pass an empty Hash as a request object (see above).
347
+ #
348
+ # @param name [::String]
337
349
  # Name of the approval request to approve.
338
- # @param expire_time [Google::Protobuf::Timestamp | Hash]
350
+ # @param expire_time [::Google::Protobuf::Timestamp, ::Hash]
339
351
  # The expiration time of this approval.
340
352
  #
341
- #
342
353
  # @yield [response, operation] Access the result along with the RPC operation
343
- # @yieldparam response [Google::Cloud::AccessApproval::V1::ApprovalRequest]
344
- # @yieldparam operation [GRPC::ActiveCall::Operation]
354
+ # @yieldparam response [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
355
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
345
356
  #
346
- # @return [Google::Cloud::AccessApproval::V1::ApprovalRequest]
357
+ # @return [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
347
358
  #
348
- # @raise [Google::Cloud::Error] if the RPC is aborted.
359
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
349
360
  #
350
361
  def approve_approval_request request, options = nil
351
- raise ArgumentError, "request must be provided" if request.nil?
362
+ raise ::ArgumentError, "request must be provided" if request.nil?
352
363
 
353
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage
364
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage
354
365
 
355
366
  # Converts hash and nil to an options object
356
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
367
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
357
368
 
358
369
  # Customize the options with defaults
359
370
  metadata = @config.rpcs.approve_approval_request.metadata.to_h
360
371
 
361
372
  # Set x-goog-api-client and x-goog-user-project headers
362
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
373
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
363
374
  lib_name: @config.lib_name, lib_version: @config.lib_version,
364
375
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
365
376
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -380,8 +391,8 @@ module Google
380
391
  yield response, operation if block_given?
381
392
  return response
382
393
  end
383
- rescue GRPC::BadStatus => e
384
- raise Google::Cloud::Error.from_error(e)
394
+ rescue ::GRPC::BadStatus => e
395
+ raise ::Google::Cloud::Error.from_error(e)
385
396
  end
386
397
 
387
398
  ##
@@ -397,46 +408,44 @@ module Google
397
408
  # state.
398
409
  #
399
410
  # @overload dismiss_approval_request(request, options = nil)
400
- # @param request [Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage | Hash]
401
- # Dismisses a request. Returns the updated ApprovalRequest.
402
- #
403
- # NOTE: This does not deny access to the resource if another request has been
404
- # made and approved. It is equivalent in effect to ignoring the request
405
- # altogether.
411
+ # Pass arguments to `dismiss_approval_request` via a request object, either of type
412
+ # {::Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage} or an equivalent Hash.
406
413
  #
407
- # Returns NOT_FOUND if the request does not exist.
408
- #
409
- # Returns FAILED_PRECONDITION if the request exists but is not in a pending
410
- # state.
411
- # @param options [Gapic::CallOptions, Hash]
414
+ # @param request [::Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage, ::Hash]
415
+ # A request object representing the call parameters. Required. To specify no
416
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
417
+ # @param options [::Gapic::CallOptions, ::Hash]
412
418
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
413
419
  #
414
420
  # @overload dismiss_approval_request(name: nil)
415
- # @param name [String]
416
- # Name of the ApprovalRequest to dismiss.
421
+ # Pass arguments to `dismiss_approval_request` via keyword arguments. Note that at
422
+ # least one keyword argument is required. To specify no parameters, or to keep all
423
+ # the default parameter values, pass an empty Hash as a request object (see above).
417
424
  #
425
+ # @param name [::String]
426
+ # Name of the ApprovalRequest to dismiss.
418
427
  #
419
428
  # @yield [response, operation] Access the result along with the RPC operation
420
- # @yieldparam response [Google::Cloud::AccessApproval::V1::ApprovalRequest]
421
- # @yieldparam operation [GRPC::ActiveCall::Operation]
429
+ # @yieldparam response [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
430
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
422
431
  #
423
- # @return [Google::Cloud::AccessApproval::V1::ApprovalRequest]
432
+ # @return [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
424
433
  #
425
- # @raise [Google::Cloud::Error] if the RPC is aborted.
434
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
426
435
  #
427
436
  def dismiss_approval_request request, options = nil
428
- raise ArgumentError, "request must be provided" if request.nil?
437
+ raise ::ArgumentError, "request must be provided" if request.nil?
429
438
 
430
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage
439
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage
431
440
 
432
441
  # Converts hash and nil to an options object
433
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
442
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
434
443
 
435
444
  # Customize the options with defaults
436
445
  metadata = @config.rpcs.dismiss_approval_request.metadata.to_h
437
446
 
438
447
  # Set x-goog-api-client and x-goog-user-project headers
439
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
448
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
440
449
  lib_name: @config.lib_name, lib_version: @config.lib_version,
441
450
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
442
451
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -457,45 +466,52 @@ module Google
457
466
  yield response, operation if block_given?
458
467
  return response
459
468
  end
460
- rescue GRPC::BadStatus => e
461
- raise Google::Cloud::Error.from_error(e)
469
+ rescue ::GRPC::BadStatus => e
470
+ raise ::Google::Cloud::Error.from_error(e)
462
471
  end
463
472
 
464
473
  ##
465
474
  # Gets the settings associated with a project, folder, or organization.
466
475
  #
467
476
  # @overload get_access_approval_settings(request, options = nil)
468
- # @param request [Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage | Hash]
469
- # Gets the settings associated with a project, folder, or organization.
470
- # @param options [Gapic::CallOptions, Hash]
477
+ # Pass arguments to `get_access_approval_settings` via a request object, either of type
478
+ # {::Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage} or an equivalent Hash.
479
+ #
480
+ # @param request [::Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage, ::Hash]
481
+ # A request object representing the call parameters. Required. To specify no
482
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
483
+ # @param options [::Gapic::CallOptions, ::Hash]
471
484
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
472
485
  #
473
486
  # @overload get_access_approval_settings(name: nil)
474
- # @param name [String]
475
- # Name of the AccessApprovalSettings to retrieve.
487
+ # Pass arguments to `get_access_approval_settings` via keyword arguments. Note that at
488
+ # least one keyword argument is required. To specify no parameters, or to keep all
489
+ # the default parameter values, pass an empty Hash as a request object (see above).
476
490
  #
491
+ # @param name [::String]
492
+ # Name of the AccessApprovalSettings to retrieve.
477
493
  #
478
494
  # @yield [response, operation] Access the result along with the RPC operation
479
- # @yieldparam response [Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
480
- # @yieldparam operation [GRPC::ActiveCall::Operation]
495
+ # @yieldparam response [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
496
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
481
497
  #
482
- # @return [Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
498
+ # @return [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
483
499
  #
484
- # @raise [Google::Cloud::Error] if the RPC is aborted.
500
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
485
501
  #
486
502
  def get_access_approval_settings request, options = nil
487
- raise ArgumentError, "request must be provided" if request.nil?
503
+ raise ::ArgumentError, "request must be provided" if request.nil?
488
504
 
489
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage
505
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage
490
506
 
491
507
  # Converts hash and nil to an options object
492
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
508
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
493
509
 
494
510
  # Customize the options with defaults
495
511
  metadata = @config.rpcs.get_access_approval_settings.metadata.to_h
496
512
 
497
513
  # Set x-goog-api-client and x-goog-user-project headers
498
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
514
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
499
515
  lib_name: @config.lib_name, lib_version: @config.lib_version,
500
516
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
501
517
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -516,8 +532,8 @@ module Google
516
532
  yield response, operation if block_given?
517
533
  return response
518
534
  end
519
- rescue GRPC::BadStatus => e
520
- raise Google::Cloud::Error.from_error(e)
535
+ rescue ::GRPC::BadStatus => e
536
+ raise ::Google::Cloud::Error.from_error(e)
521
537
  end
522
538
 
523
539
  ##
@@ -525,16 +541,23 @@ module Google
525
541
  # Settings to update are determined by the value of field_mask.
526
542
  #
527
543
  # @overload update_access_approval_settings(request, options = nil)
528
- # @param request [Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage | Hash]
529
- # Updates the settings associated with a project, folder, or organization.
530
- # Settings to update are determined by the value of field_mask.
531
- # @param options [Gapic::CallOptions, Hash]
544
+ # Pass arguments to `update_access_approval_settings` via a request object, either of type
545
+ # {::Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage} or an equivalent Hash.
546
+ #
547
+ # @param request [::Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage, ::Hash]
548
+ # A request object representing the call parameters. Required. To specify no
549
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
550
+ # @param options [::Gapic::CallOptions, ::Hash]
532
551
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
533
552
  #
534
553
  # @overload update_access_approval_settings(settings: nil, update_mask: nil)
535
- # @param settings [Google::Cloud::AccessApproval::V1::AccessApprovalSettings | Hash]
554
+ # Pass arguments to `update_access_approval_settings` via keyword arguments. Note that at
555
+ # least one keyword argument is required. To specify no parameters, or to keep all
556
+ # the default parameter values, pass an empty Hash as a request object (see above).
557
+ #
558
+ # @param settings [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings, ::Hash]
536
559
  # The new AccessApprovalSettings.
537
- # @param update_mask [Google::Protobuf::FieldMask | Hash]
560
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
538
561
  # The update mask applies to the settings. Only the top level fields of
539
562
  # AccessApprovalSettings (notification_emails & enrolled_services) are
540
563
  # supported. For each field, if it is included, the currently stored value
@@ -546,28 +569,27 @@ module Google
546
569
  # If this field is left unset, only the notification_emails field will be
547
570
  # updated.
548
571
  #
549
- #
550
572
  # @yield [response, operation] Access the result along with the RPC operation
551
- # @yieldparam response [Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
552
- # @yieldparam operation [GRPC::ActiveCall::Operation]
573
+ # @yieldparam response [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
574
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
553
575
  #
554
- # @return [Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
576
+ # @return [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
555
577
  #
556
- # @raise [Google::Cloud::Error] if the RPC is aborted.
578
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
557
579
  #
558
580
  def update_access_approval_settings request, options = nil
559
- raise ArgumentError, "request must be provided" if request.nil?
581
+ raise ::ArgumentError, "request must be provided" if request.nil?
560
582
 
561
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage
583
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage
562
584
 
563
585
  # Converts hash and nil to an options object
564
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
586
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
565
587
 
566
588
  # Customize the options with defaults
567
589
  metadata = @config.rpcs.update_access_approval_settings.metadata.to_h
568
590
 
569
591
  # Set x-goog-api-client and x-goog-user-project headers
570
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
592
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
571
593
  lib_name: @config.lib_name, lib_version: @config.lib_version,
572
594
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
573
595
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -588,8 +610,8 @@ module Google
588
610
  yield response, operation if block_given?
589
611
  return response
590
612
  end
591
- rescue GRPC::BadStatus => e
592
- raise Google::Cloud::Error.from_error(e)
613
+ rescue ::GRPC::BadStatus => e
614
+ raise ::Google::Cloud::Error.from_error(e)
593
615
  end
594
616
 
595
617
  ##
@@ -601,42 +623,44 @@ module Google
601
623
  # the settings are inherited.
602
624
  #
603
625
  # @overload delete_access_approval_settings(request, options = nil)
604
- # @param request [Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage | Hash]
605
- # Deletes the settings associated with a project, folder, or organization.
606
- # This will have the effect of disabling Access Approval for the project,
607
- # folder, or organization, but only if all ancestors also have Access
608
- # Approval disabled. If Access Approval is enabled at a higher level of the
609
- # hierarchy, then Access Approval will still be enabled at this level as
610
- # the settings are inherited.
611
- # @param options [Gapic::CallOptions, Hash]
626
+ # Pass arguments to `delete_access_approval_settings` via a request object, either of type
627
+ # {::Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage} or an equivalent Hash.
628
+ #
629
+ # @param request [::Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage, ::Hash]
630
+ # A request object representing the call parameters. Required. To specify no
631
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
632
+ # @param options [::Gapic::CallOptions, ::Hash]
612
633
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
613
634
  #
614
635
  # @overload delete_access_approval_settings(name: nil)
615
- # @param name [String]
616
- # Name of the AccessApprovalSettings to delete.
636
+ # Pass arguments to `delete_access_approval_settings` via keyword arguments. Note that at
637
+ # least one keyword argument is required. To specify no parameters, or to keep all
638
+ # the default parameter values, pass an empty Hash as a request object (see above).
617
639
  #
640
+ # @param name [::String]
641
+ # Name of the AccessApprovalSettings to delete.
618
642
  #
619
643
  # @yield [response, operation] Access the result along with the RPC operation
620
- # @yieldparam response [Google::Protobuf::Empty]
621
- # @yieldparam operation [GRPC::ActiveCall::Operation]
644
+ # @yieldparam response [::Google::Protobuf::Empty]
645
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
622
646
  #
623
- # @return [Google::Protobuf::Empty]
647
+ # @return [::Google::Protobuf::Empty]
624
648
  #
625
- # @raise [Google::Cloud::Error] if the RPC is aborted.
649
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
626
650
  #
627
651
  def delete_access_approval_settings request, options = nil
628
- raise ArgumentError, "request must be provided" if request.nil?
652
+ raise ::ArgumentError, "request must be provided" if request.nil?
629
653
 
630
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage
654
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage
631
655
 
632
656
  # Converts hash and nil to an options object
633
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
657
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
634
658
 
635
659
  # Customize the options with defaults
636
660
  metadata = @config.rpcs.delete_access_approval_settings.metadata.to_h
637
661
 
638
662
  # Set x-goog-api-client and x-goog-user-project headers
639
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
663
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
640
664
  lib_name: @config.lib_name, lib_version: @config.lib_version,
641
665
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
642
666
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -657,8 +681,8 @@ module Google
657
681
  yield response, operation if block_given?
658
682
  return response
659
683
  end
660
- rescue GRPC::BadStatus => e
661
- raise Google::Cloud::Error.from_error(e)
684
+ rescue ::GRPC::BadStatus => e
685
+ raise ::Google::Cloud::Error.from_error(e)
662
686
  end
663
687
 
664
688
  ##
@@ -668,7 +692,7 @@ module Google
668
692
  # providing control over timeouts, retry behavior, logging, transport
669
693
  # parameters, and other low-level controls. Certain parameters can also be
670
694
  # applied individually to specific RPCs. See
671
- # {Google::Cloud::AccessApproval::V1::AccessApproval::Client::Configuration::Rpcs}
695
+ # {::Google::Cloud::AccessApproval::V1::AccessApproval::Client::Configuration::Rpcs}
672
696
  # for a list of RPCs that can be configured independently.
673
697
  #
674
698
  # Configuration can be applied globally to all clients, or to a single client
@@ -679,22 +703,22 @@ module Google
679
703
  # To modify the global config, setting the timeout for list_approval_requests
680
704
  # to 20 seconds, and all remaining timeouts to 10 seconds:
681
705
  #
682
- # Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
683
- # config.timeout = 10_000
684
- # config.rpcs.list_approval_requests.timeout = 20_000
706
+ # ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
707
+ # config.timeout = 10.0
708
+ # config.rpcs.list_approval_requests.timeout = 20.0
685
709
  # end
686
710
  #
687
711
  # To apply the above configuration only to a new client:
688
712
  #
689
- # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
690
- # config.timeout = 10_000
691
- # config.rpcs.list_approval_requests.timeout = 20_000
713
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
714
+ # config.timeout = 10.0
715
+ # config.rpcs.list_approval_requests.timeout = 20.0
692
716
  # end
693
717
  #
694
718
  # @!attribute [rw] endpoint
695
719
  # The hostname or hostname:port of the service endpoint.
696
720
  # Defaults to `"accessapproval.googleapis.com"`.
697
- # @return [String]
721
+ # @return [::String]
698
722
  # @!attribute [rw] credentials
699
723
  # Credentials to send with calls. You may provide any of the following types:
700
724
  # * (`String`) The path to a service account key file in JSON format
@@ -706,29 +730,29 @@ module Google
706
730
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
707
731
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
708
732
  # * (`nil`) indicating no credentials
709
- # @return [Object]
733
+ # @return [::Object]
710
734
  # @!attribute [rw] scope
711
735
  # The OAuth scopes
712
- # @return [Array<String>]
736
+ # @return [::Array<::String>]
713
737
  # @!attribute [rw] lib_name
714
738
  # The library name as recorded in instrumentation and logging
715
- # @return [String]
739
+ # @return [::String]
716
740
  # @!attribute [rw] lib_version
717
741
  # The library version as recorded in instrumentation and logging
718
- # @return [String]
742
+ # @return [::String]
719
743
  # @!attribute [rw] channel_args
720
744
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
721
745
  # `GRPC::Core::Channel` object is provided as the credential.
722
- # @return [Hash]
746
+ # @return [::Hash]
723
747
  # @!attribute [rw] interceptors
724
748
  # An array of interceptors that are run before calls are executed.
725
- # @return [Array<GRPC::ClientInterceptor>]
749
+ # @return [::Array<::GRPC::ClientInterceptor>]
726
750
  # @!attribute [rw] timeout
727
- # The call timeout in milliseconds.
728
- # @return [Numeric]
751
+ # The call timeout in seconds.
752
+ # @return [::Numeric]
729
753
  # @!attribute [rw] metadata
730
754
  # Additional gRPC headers to be sent with the call.
731
- # @return [Hash{Symbol=>String}]
755
+ # @return [::Hash{::Symbol=>::String}]
732
756
  # @!attribute [rw] retry_policy
733
757
  # The retry policy. The value is a hash with the following keys:
734
758
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -736,25 +760,29 @@ module Google
736
760
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
737
761
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
738
762
  # trigger a retry.
739
- # @return [Hash]
763
+ # @return [::Hash]
764
+ # @!attribute [rw] quota_project
765
+ # A separate project against which to charge quota.
766
+ # @return [::String]
740
767
  #
741
768
  class Configuration
742
- extend Gapic::Config
769
+ extend ::Gapic::Config
743
770
 
744
- config_attr :endpoint, "accessapproval.googleapis.com", String
745
- config_attr :credentials, nil do |value|
771
+ config_attr :endpoint, "accessapproval.googleapis.com", ::String
772
+ config_attr :credentials, nil do |value|
746
773
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
747
774
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
748
775
  allowed.any? { |klass| klass === value }
749
776
  end
750
- config_attr :scope, nil, String, Array, nil
751
- config_attr :lib_name, nil, String, nil
752
- config_attr :lib_version, nil, String, nil
753
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
754
- config_attr :interceptors, nil, Array, nil
755
- config_attr :timeout, nil, Numeric, nil
756
- config_attr :metadata, nil, Hash, nil
757
- config_attr :retry_policy, nil, Hash, Proc, nil
777
+ config_attr :scope, nil, ::String, ::Array, nil
778
+ config_attr :lib_name, nil, ::String, nil
779
+ config_attr :lib_version, nil, ::String, nil
780
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
781
+ config_attr :interceptors, nil, ::Array, nil
782
+ config_attr :timeout, nil, ::Numeric, nil
783
+ config_attr :metadata, nil, ::Hash, nil
784
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
785
+ config_attr :quota_project, nil, ::String, nil
758
786
 
759
787
  # @private
760
788
  def initialize parent_config = nil
@@ -795,56 +823,56 @@ module Google
795
823
  class Rpcs
796
824
  ##
797
825
  # RPC-specific configuration for `list_approval_requests`
798
- # @return [Gapic::Config::Method]
826
+ # @return [::Gapic::Config::Method]
799
827
  #
800
828
  attr_reader :list_approval_requests
801
829
  ##
802
830
  # RPC-specific configuration for `get_approval_request`
803
- # @return [Gapic::Config::Method]
831
+ # @return [::Gapic::Config::Method]
804
832
  #
805
833
  attr_reader :get_approval_request
806
834
  ##
807
835
  # RPC-specific configuration for `approve_approval_request`
808
- # @return [Gapic::Config::Method]
836
+ # @return [::Gapic::Config::Method]
809
837
  #
810
838
  attr_reader :approve_approval_request
811
839
  ##
812
840
  # RPC-specific configuration for `dismiss_approval_request`
813
- # @return [Gapic::Config::Method]
841
+ # @return [::Gapic::Config::Method]
814
842
  #
815
843
  attr_reader :dismiss_approval_request
816
844
  ##
817
845
  # RPC-specific configuration for `get_access_approval_settings`
818
- # @return [Gapic::Config::Method]
846
+ # @return [::Gapic::Config::Method]
819
847
  #
820
848
  attr_reader :get_access_approval_settings
821
849
  ##
822
850
  # RPC-specific configuration for `update_access_approval_settings`
823
- # @return [Gapic::Config::Method]
851
+ # @return [::Gapic::Config::Method]
824
852
  #
825
853
  attr_reader :update_access_approval_settings
826
854
  ##
827
855
  # RPC-specific configuration for `delete_access_approval_settings`
828
- # @return [Gapic::Config::Method]
856
+ # @return [::Gapic::Config::Method]
829
857
  #
830
858
  attr_reader :delete_access_approval_settings
831
859
 
832
860
  # @private
833
861
  def initialize parent_rpcs = nil
834
862
  list_approval_requests_config = parent_rpcs&.list_approval_requests if parent_rpcs&.respond_to? :list_approval_requests
835
- @list_approval_requests = Gapic::Config::Method.new list_approval_requests_config
863
+ @list_approval_requests = ::Gapic::Config::Method.new list_approval_requests_config
836
864
  get_approval_request_config = parent_rpcs&.get_approval_request if parent_rpcs&.respond_to? :get_approval_request
837
- @get_approval_request = Gapic::Config::Method.new get_approval_request_config
865
+ @get_approval_request = ::Gapic::Config::Method.new get_approval_request_config
838
866
  approve_approval_request_config = parent_rpcs&.approve_approval_request if parent_rpcs&.respond_to? :approve_approval_request
839
- @approve_approval_request = Gapic::Config::Method.new approve_approval_request_config
867
+ @approve_approval_request = ::Gapic::Config::Method.new approve_approval_request_config
840
868
  dismiss_approval_request_config = parent_rpcs&.dismiss_approval_request if parent_rpcs&.respond_to? :dismiss_approval_request
841
- @dismiss_approval_request = Gapic::Config::Method.new dismiss_approval_request_config
869
+ @dismiss_approval_request = ::Gapic::Config::Method.new dismiss_approval_request_config
842
870
  get_access_approval_settings_config = parent_rpcs&.get_access_approval_settings if parent_rpcs&.respond_to? :get_access_approval_settings
843
- @get_access_approval_settings = Gapic::Config::Method.new get_access_approval_settings_config
871
+ @get_access_approval_settings = ::Gapic::Config::Method.new get_access_approval_settings_config
844
872
  update_access_approval_settings_config = parent_rpcs&.update_access_approval_settings if parent_rpcs&.respond_to? :update_access_approval_settings
845
- @update_access_approval_settings = Gapic::Config::Method.new update_access_approval_settings_config
873
+ @update_access_approval_settings = ::Gapic::Config::Method.new update_access_approval_settings_config
846
874
  delete_access_approval_settings_config = parent_rpcs&.delete_access_approval_settings if parent_rpcs&.respond_to? :delete_access_approval_settings
847
- @delete_access_approval_settings = Gapic::Config::Method.new delete_access_approval_settings_config
875
+ @delete_access_approval_settings = ::Gapic::Config::Method.new delete_access_approval_settings_config
848
876
 
849
877
  yield self if block_given?
850
878
  end
@@ -856,13 +884,3 @@ module Google
856
884
  end
857
885
  end
858
886
  end
859
-
860
- # rubocop:disable Lint/HandleExceptions
861
-
862
- # Once client is loaded, load helpers.rb if it exists.
863
- begin
864
- require "google/cloud/access_approval/v1/access_approval/helpers"
865
- rescue LoadError
866
- end
867
-
868
- # rubocop:enable Lint/HandleExceptions