google-cloud-secret_manager-v1 0.2.1 → 0.4.2

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: 502ee1115b885a0cf4cedf43e2fc7719dd730454c764aab08e381d0592c8765e
4
- data.tar.gz: c8536e83842bf62402ea028a3c371cb20d3e80a84ddadc0e255d4679c5b6b145
3
+ metadata.gz: 4bb51798c84c86d7ef19644cdf0462bbc65cd85ad9d139a9a2f267bd29b7cbaf
4
+ data.tar.gz: 79b59c3905d686cfdda416f793fce81bde1a998af9b43bc547ea9dd196b9167e
5
5
  SHA512:
6
- metadata.gz: 19570d33db42474af4eb898a73609b80e838e1fa789dc4cd23ca612824ebe01e23349174399df14a2e1bdd50d3909811711361ea2b61c1d81d97cc4930faf811
7
- data.tar.gz: c41e651a2e452bd0fcdbcc8d72d36a816f5454fb8c57ce8d84c970c68b4eb83182a58916b05441519dbadc8bb9a9831dc2611ead9ca773d450096844dfcce576
6
+ metadata.gz: d8aa4cacc6d510414937a8d8b8a7e90bc78f592115f0d33d2c6f998d0ea553ba944d1c004327b54308d8f52b899c3e68b566e1dc13bc1a375971322f1a560fb1
7
+ data.tar.gz: 2d0819cb3b0377de4738c0bee0359617721cc258c716e8e37020e47f93dae868fda864223cebf9f6fb75d26c9965988aa8e4f5c876ecdd8b59392b8a16057c6f
@@ -27,7 +27,7 @@ export SECRET_MANAGER_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/secret_manager/v1"
29
29
 
30
- client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
30
+ client = ::Google::Cloud::SecretManager::V1::SecretManagerService::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-secret_manager-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- {Google::Cloud::SecretManager::V1::SecretManagerService::Credentials}):
67
+ {::Google::Cloud::SecretManager::V1::SecretManagerService::Credentials}):
68
68
 
69
69
  1. `SECRET_MANAGER_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  2. `SECRET_MANAGER_KEYFILE` - Path to JSON file, or JSON contents
@@ -77,7 +77,7 @@ require "google/cloud/secret_manager/v1"
77
77
 
78
78
  ENV["SECRET_MANAGER_CREDENTIALS"] = "path/to/keyfile.json"
79
79
 
80
- client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
80
+ client = ::Google::Cloud::SecretManager::V1::SecretManagerService::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/secret_manager/v1"
90
90
 
91
- client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
91
+ client = ::Google::Cloud::SecretManager::V1::SecretManagerService::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/secret_manager/v1"
100
100
 
101
- Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
101
+ ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
102
102
  config.credentials = "path/to/keyfile.json"
103
103
  end
104
104
 
105
- client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
105
+ client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
106
106
  ```
107
107
 
108
108
  ### Cloud SDK
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Secret Manager V1
1
+ # Ruby Client for the Secret Manager V1 API
2
2
 
3
3
  API Client library for the Secret Manager V1 API
4
4
 
@@ -12,6 +12,53 @@ https://github.com/googleapis/google-cloud-ruby
12
12
  $ gem install google-cloud-secret_manager-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/secret_manager/v1"
27
+
28
+ client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
29
+ request = my_create_request
30
+ response = client.list_secrets request
31
+ ```
32
+
33
+ View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-secret_manager-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/secret_manager/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/secret_manager/v1"
@@ -17,3 +17,19 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/secret_manager/v1/secret_manager_service"
20
+ require "google/cloud/secret_manager/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module SecretManager
25
+ ##
26
+ # To load this package, including all its services, and instantiate a client:
27
+ #
28
+ # require "google/cloud/secret_manager/v1"
29
+ # client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
30
+ #
31
+ module V1
32
+ end
33
+ end
34
+ end
35
+ end
@@ -16,5 +16,40 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "google/cloud/secret_manager/v1/secret_manager_service/client"
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/secret_manager/v1/version"
24
+
20
25
  require "google/cloud/secret_manager/v1/secret_manager_service/credentials"
26
+ require "google/cloud/secret_manager/v1/secret_manager_service/paths"
27
+ require "google/cloud/secret_manager/v1/secret_manager_service/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module SecretManager
32
+ module V1
33
+ ##
34
+ # Secret Manager Service
35
+ #
36
+ # Manages secrets and operations using those secrets. Implements a REST
37
+ # model with the following objects:
38
+ #
39
+ # * {::Google::Cloud::SecretManager::V1::Secret Secret}
40
+ # * {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}
41
+ #
42
+ # To load this service and instantiate a client:
43
+ #
44
+ # require "google/cloud/secret_manager/v1/secret_manager_service"
45
+ # client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
46
+ #
47
+ module SecretManagerService
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ helper_path = ::File.join __dir__, "secret_manager_service", "helpers.rb"
55
+ require "google/cloud/secret_manager/v1/secret_manager_service/helpers" if ::File.file? helper_path
@@ -16,15 +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/secret_manager/v1/version"
25
20
  require "google/cloud/secretmanager/v1/service_pb"
26
- require "google/cloud/secret_manager/v1/secret_manager_service/credentials"
27
- require "google/cloud/secret_manager/v1/secret_manager_service/paths"
28
21
 
29
22
  module Google
30
23
  module Cloud
@@ -39,8 +32,8 @@ module Google
39
32
  # Manages secrets and operations using those secrets. Implements a REST
40
33
  # model with the following objects:
41
34
  #
42
- # * {Google::Cloud::SecretManager::V1::Secret Secret}
43
- # * {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}
35
+ # * {::Google::Cloud::SecretManager::V1::Secret Secret}
36
+ # * {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}
44
37
  #
45
38
  class Client
46
39
  include Paths
@@ -51,15 +44,15 @@ module Google
51
44
  ##
52
45
  # Configure the SecretManagerService Client class.
53
46
  #
54
- # See {Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration}
47
+ # See {::Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration}
55
48
  # for a description of the configuration fields.
56
49
  #
57
50
  # ## Example
58
51
  #
59
52
  # To modify the configuration for all SecretManagerService clients:
60
53
  #
61
- # Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
62
- # config.timeout = 10_000
54
+ # ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
55
+ # config.timeout = 10.0
63
56
  # end
64
57
  #
65
58
  # @yield [config] Configure the Client client.
@@ -127,7 +120,7 @@ module Google
127
120
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
128
121
  # should be made on {Client.configure}.
129
122
  #
130
- # See {Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration}
123
+ # See {::Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration}
131
124
  # for a description of the configuration fields.
132
125
  #
133
126
  # @yield [config] Configure the Client client.
@@ -148,13 +141,13 @@ module Google
148
141
  # To create a new SecretManagerService client with the default
149
142
  # configuration:
150
143
  #
151
- # client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
144
+ # client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new
152
145
  #
153
146
  # To create a new SecretManagerService client with a custom
154
147
  # configuration:
155
148
  #
156
- # client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
157
- # config.timeout = 10_000
149
+ # client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
150
+ # config.timeout = 10.0
158
151
  # end
159
152
  #
160
153
  # @yield [config] Configure the SecretManagerService client.
@@ -179,10 +172,11 @@ module Google
179
172
  if credentials.is_a?(String) || credentials.is_a?(Hash)
180
173
  credentials = Credentials.new credentials, scope: @config.scope
181
174
  end
182
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
175
+ @quota_project_id = @config.quota_project
176
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
183
177
 
184
- @secret_manager_service_stub = Gapic::ServiceStub.new(
185
- Google::Cloud::SecretManager::V1::SecretManagerService::Stub,
178
+ @secret_manager_service_stub = ::Gapic::ServiceStub.new(
179
+ ::Google::Cloud::SecretManager::V1::SecretManagerService::Stub,
186
180
  credentials: credentials,
187
181
  endpoint: @config.endpoint,
188
182
  channel_args: @config.channel_args,
@@ -193,48 +187,55 @@ module Google
193
187
  # Service calls
194
188
 
195
189
  ##
196
- # Lists {Google::Cloud::SecretManager::V1::Secret Secrets}.
190
+ # Lists {::Google::Cloud::SecretManager::V1::Secret Secrets}.
197
191
  #
198
192
  # @overload list_secrets(request, options = nil)
199
- # @param request [Google::Cloud::SecretManager::V1::ListSecretsRequest | Hash]
200
- # Lists {Google::Cloud::SecretManager::V1::Secret Secrets}.
201
- # @param options [Gapic::CallOptions, Hash]
193
+ # Pass arguments to `list_secrets` via a request object, either of type
194
+ # {::Google::Cloud::SecretManager::V1::ListSecretsRequest} or an equivalent Hash.
195
+ #
196
+ # @param request [::Google::Cloud::SecretManager::V1::ListSecretsRequest, ::Hash]
197
+ # A request object representing the call parameters. Required. To specify no
198
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
199
+ # @param options [::Gapic::CallOptions, ::Hash]
202
200
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
203
201
  #
204
202
  # @overload list_secrets(parent: nil, page_size: nil, page_token: nil)
205
- # @param parent [String]
203
+ # Pass arguments to `list_secrets` via keyword arguments. Note that at
204
+ # least one keyword argument is required. To specify no parameters, or to keep all
205
+ # the default parameter values, pass an empty Hash as a request object (see above).
206
+ #
207
+ # @param parent [::String]
206
208
  # Required. The resource name of the project associated with the
207
- # {Google::Cloud::SecretManager::V1::Secret Secrets}, in the format `projects/*`.
208
- # @param page_size [Integer]
209
+ # {::Google::Cloud::SecretManager::V1::Secret Secrets}, in the format `projects/*`.
210
+ # @param page_size [::Integer]
209
211
  # Optional. The maximum number of results to be returned in a single page. If
210
212
  # set to 0, the server decides the number of results to return. If the
211
213
  # number is greater than 25000, it is capped at 25000.
212
- # @param page_token [String]
214
+ # @param page_token [::String]
213
215
  # Optional. Pagination token, returned earlier via
214
- # {Google::Cloud::SecretManager::V1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}.
215
- #
216
+ # {::Google::Cloud::SecretManager::V1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}.
216
217
  #
217
218
  # @yield [response, operation] Access the result along with the RPC operation
218
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::SecretManager::V1::Secret>]
219
- # @yieldparam operation [GRPC::ActiveCall::Operation]
219
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1::Secret>]
220
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
220
221
  #
221
- # @return [Gapic::PagedEnumerable<Google::Cloud::SecretManager::V1::Secret>]
222
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1::Secret>]
222
223
  #
223
- # @raise [Google::Cloud::Error] if the RPC is aborted.
224
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
224
225
  #
225
226
  def list_secrets request, options = nil
226
- raise ArgumentError, "request must be provided" if request.nil?
227
+ raise ::ArgumentError, "request must be provided" if request.nil?
227
228
 
228
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::ListSecretsRequest
229
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::ListSecretsRequest
229
230
 
230
231
  # Converts hash and nil to an options object
231
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
232
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
232
233
 
233
234
  # Customize the options with defaults
234
235
  metadata = @config.rpcs.list_secrets.metadata.to_h
235
236
 
236
237
  # Set x-goog-api-client and x-goog-user-project headers
237
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
238
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
238
239
  lib_name: @config.lib_name, lib_version: @config.lib_version,
239
240
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
240
241
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -252,58 +253,65 @@ module Google
252
253
  retry_policy: @config.retry_policy
253
254
 
254
255
  @secret_manager_service_stub.call_rpc :list_secrets, request, options: options do |response, operation|
255
- response = Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, request, response, operation, options
256
+ response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, request, response, operation, options
256
257
  yield response, operation if block_given?
257
258
  return response
258
259
  end
259
- rescue GRPC::BadStatus => e
260
- raise Google::Cloud::Error.from_error(e)
260
+ rescue ::GRPC::BadStatus => e
261
+ raise ::Google::Cloud::Error.from_error(e)
261
262
  end
262
263
 
263
264
  ##
264
- # Creates a new {Google::Cloud::SecretManager::V1::Secret Secret} containing no {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}.
265
+ # Creates a new {::Google::Cloud::SecretManager::V1::Secret Secret} containing no {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}.
265
266
  #
266
267
  # @overload create_secret(request, options = nil)
267
- # @param request [Google::Cloud::SecretManager::V1::CreateSecretRequest | Hash]
268
- # Creates a new {Google::Cloud::SecretManager::V1::Secret Secret} containing no {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}.
269
- # @param options [Gapic::CallOptions, Hash]
268
+ # Pass arguments to `create_secret` via a request object, either of type
269
+ # {::Google::Cloud::SecretManager::V1::CreateSecretRequest} or an equivalent Hash.
270
+ #
271
+ # @param request [::Google::Cloud::SecretManager::V1::CreateSecretRequest, ::Hash]
272
+ # A request object representing the call parameters. Required. To specify no
273
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
274
+ # @param options [::Gapic::CallOptions, ::Hash]
270
275
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
271
276
  #
272
277
  # @overload create_secret(parent: nil, secret_id: nil, secret: nil)
273
- # @param parent [String]
278
+ # Pass arguments to `create_secret` via keyword arguments. Note that at
279
+ # least one keyword argument is required. To specify no parameters, or to keep all
280
+ # the default parameter values, pass an empty Hash as a request object (see above).
281
+ #
282
+ # @param parent [::String]
274
283
  # Required. The resource name of the project to associate with the
275
- # {Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*`.
276
- # @param secret_id [String]
284
+ # {::Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*`.
285
+ # @param secret_id [::String]
277
286
  # Required. This must be unique within the project.
278
287
  #
279
288
  # A secret ID is a string with a maximum length of 255 characters and can
280
289
  # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and
281
290
  # underscore (`_`) characters.
282
- # @param secret [Google::Cloud::SecretManager::V1::Secret | Hash]
283
- # Required. A {Google::Cloud::SecretManager::V1::Secret Secret} with initial field values.
284
- #
291
+ # @param secret [::Google::Cloud::SecretManager::V1::Secret, ::Hash]
292
+ # Required. A {::Google::Cloud::SecretManager::V1::Secret Secret} with initial field values.
285
293
  #
286
294
  # @yield [response, operation] Access the result along with the RPC operation
287
- # @yieldparam response [Google::Cloud::SecretManager::V1::Secret]
288
- # @yieldparam operation [GRPC::ActiveCall::Operation]
295
+ # @yieldparam response [::Google::Cloud::SecretManager::V1::Secret]
296
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
289
297
  #
290
- # @return [Google::Cloud::SecretManager::V1::Secret]
298
+ # @return [::Google::Cloud::SecretManager::V1::Secret]
291
299
  #
292
- # @raise [Google::Cloud::Error] if the RPC is aborted.
300
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
293
301
  #
294
302
  def create_secret request, options = nil
295
- raise ArgumentError, "request must be provided" if request.nil?
303
+ raise ::ArgumentError, "request must be provided" if request.nil?
296
304
 
297
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::CreateSecretRequest
305
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::CreateSecretRequest
298
306
 
299
307
  # Converts hash and nil to an options object
300
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
308
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
301
309
 
302
310
  # Customize the options with defaults
303
311
  metadata = @config.rpcs.create_secret.metadata.to_h
304
312
 
305
313
  # Set x-goog-api-client and x-goog-user-project headers
306
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
314
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
307
315
  lib_name: @config.lib_name, lib_version: @config.lib_version,
308
316
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
309
317
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -324,50 +332,56 @@ module Google
324
332
  yield response, operation if block_given?
325
333
  return response
326
334
  end
327
- rescue GRPC::BadStatus => e
328
- raise Google::Cloud::Error.from_error(e)
335
+ rescue ::GRPC::BadStatus => e
336
+ raise ::Google::Cloud::Error.from_error(e)
329
337
  end
330
338
 
331
339
  ##
332
- # Creates a new {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} containing secret data and attaches
333
- # it to an existing {Google::Cloud::SecretManager::V1::Secret Secret}.
340
+ # Creates a new {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} containing secret data and attaches
341
+ # it to an existing {::Google::Cloud::SecretManager::V1::Secret Secret}.
334
342
  #
335
343
  # @overload add_secret_version(request, options = nil)
336
- # @param request [Google::Cloud::SecretManager::V1::AddSecretVersionRequest | Hash]
337
- # Creates a new {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} containing secret data and attaches
338
- # it to an existing {Google::Cloud::SecretManager::V1::Secret Secret}.
339
- # @param options [Gapic::CallOptions, Hash]
344
+ # Pass arguments to `add_secret_version` via a request object, either of type
345
+ # {::Google::Cloud::SecretManager::V1::AddSecretVersionRequest} or an equivalent Hash.
346
+ #
347
+ # @param request [::Google::Cloud::SecretManager::V1::AddSecretVersionRequest, ::Hash]
348
+ # A request object representing the call parameters. Required. To specify no
349
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
350
+ # @param options [::Gapic::CallOptions, ::Hash]
340
351
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
341
352
  #
342
353
  # @overload add_secret_version(parent: nil, payload: nil)
343
- # @param parent [String]
344
- # Required. The resource name of the {Google::Cloud::SecretManager::V1::Secret Secret} to associate with the
345
- # {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format `projects/*/secrets/*`.
346
- # @param payload [Google::Cloud::SecretManager::V1::SecretPayload | Hash]
347
- # Required. The secret payload of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
354
+ # Pass arguments to `add_secret_version` via keyword arguments. Note that at
355
+ # least one keyword argument is required. To specify no parameters, or to keep all
356
+ # the default parameter values, pass an empty Hash as a request object (see above).
348
357
  #
358
+ # @param parent [::String]
359
+ # Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret} to associate with the
360
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format `projects/*/secrets/*`.
361
+ # @param payload [::Google::Cloud::SecretManager::V1::SecretPayload, ::Hash]
362
+ # Required. The secret payload of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
349
363
  #
350
364
  # @yield [response, operation] Access the result along with the RPC operation
351
- # @yieldparam response [Google::Cloud::SecretManager::V1::SecretVersion]
352
- # @yieldparam operation [GRPC::ActiveCall::Operation]
365
+ # @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
366
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
353
367
  #
354
- # @return [Google::Cloud::SecretManager::V1::SecretVersion]
368
+ # @return [::Google::Cloud::SecretManager::V1::SecretVersion]
355
369
  #
356
- # @raise [Google::Cloud::Error] if the RPC is aborted.
370
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
357
371
  #
358
372
  def add_secret_version request, options = nil
359
- raise ArgumentError, "request must be provided" if request.nil?
373
+ raise ::ArgumentError, "request must be provided" if request.nil?
360
374
 
361
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::AddSecretVersionRequest
375
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::AddSecretVersionRequest
362
376
 
363
377
  # Converts hash and nil to an options object
364
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
378
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
365
379
 
366
380
  # Customize the options with defaults
367
381
  metadata = @config.rpcs.add_secret_version.metadata.to_h
368
382
 
369
383
  # Set x-goog-api-client and x-goog-user-project headers
370
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
384
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
371
385
  lib_name: @config.lib_name, lib_version: @config.lib_version,
372
386
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
373
387
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -388,45 +402,52 @@ module Google
388
402
  yield response, operation if block_given?
389
403
  return response
390
404
  end
391
- rescue GRPC::BadStatus => e
392
- raise Google::Cloud::Error.from_error(e)
405
+ rescue ::GRPC::BadStatus => e
406
+ raise ::Google::Cloud::Error.from_error(e)
393
407
  end
394
408
 
395
409
  ##
396
- # Gets metadata for a given {Google::Cloud::SecretManager::V1::Secret Secret}.
410
+ # Gets metadata for a given {::Google::Cloud::SecretManager::V1::Secret Secret}.
397
411
  #
398
412
  # @overload get_secret(request, options = nil)
399
- # @param request [Google::Cloud::SecretManager::V1::GetSecretRequest | Hash]
400
- # Gets metadata for a given {Google::Cloud::SecretManager::V1::Secret Secret}.
401
- # @param options [Gapic::CallOptions, Hash]
413
+ # Pass arguments to `get_secret` via a request object, either of type
414
+ # {::Google::Cloud::SecretManager::V1::GetSecretRequest} or an equivalent Hash.
415
+ #
416
+ # @param request [::Google::Cloud::SecretManager::V1::GetSecretRequest, ::Hash]
417
+ # A request object representing the call parameters. Required. To specify no
418
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
419
+ # @param options [::Gapic::CallOptions, ::Hash]
402
420
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
403
421
  #
404
422
  # @overload get_secret(name: nil)
405
- # @param name [String]
406
- # Required. The resource name of the {Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*/secrets/*`.
423
+ # Pass arguments to `get_secret` via keyword arguments. Note that at
424
+ # least one keyword argument is required. To specify no parameters, or to keep all
425
+ # the default parameter values, pass an empty Hash as a request object (see above).
407
426
  #
427
+ # @param name [::String]
428
+ # Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret}, in the format `projects/*/secrets/*`.
408
429
  #
409
430
  # @yield [response, operation] Access the result along with the RPC operation
410
- # @yieldparam response [Google::Cloud::SecretManager::V1::Secret]
411
- # @yieldparam operation [GRPC::ActiveCall::Operation]
431
+ # @yieldparam response [::Google::Cloud::SecretManager::V1::Secret]
432
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
412
433
  #
413
- # @return [Google::Cloud::SecretManager::V1::Secret]
434
+ # @return [::Google::Cloud::SecretManager::V1::Secret]
414
435
  #
415
- # @raise [Google::Cloud::Error] if the RPC is aborted.
436
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
416
437
  #
417
438
  def get_secret request, options = nil
418
- raise ArgumentError, "request must be provided" if request.nil?
439
+ raise ::ArgumentError, "request must be provided" if request.nil?
419
440
 
420
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::GetSecretRequest
441
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::GetSecretRequest
421
442
 
422
443
  # Converts hash and nil to an options object
423
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
444
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
424
445
 
425
446
  # Customize the options with defaults
426
447
  metadata = @config.rpcs.get_secret.metadata.to_h
427
448
 
428
449
  # Set x-goog-api-client and x-goog-user-project headers
429
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
450
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
430
451
  lib_name: @config.lib_name, lib_version: @config.lib_version,
431
452
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
432
453
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -447,47 +468,54 @@ module Google
447
468
  yield response, operation if block_given?
448
469
  return response
449
470
  end
450
- rescue GRPC::BadStatus => e
451
- raise Google::Cloud::Error.from_error(e)
471
+ rescue ::GRPC::BadStatus => e
472
+ raise ::Google::Cloud::Error.from_error(e)
452
473
  end
453
474
 
454
475
  ##
455
- # Updates metadata of an existing {Google::Cloud::SecretManager::V1::Secret Secret}.
476
+ # Updates metadata of an existing {::Google::Cloud::SecretManager::V1::Secret Secret}.
456
477
  #
457
478
  # @overload update_secret(request, options = nil)
458
- # @param request [Google::Cloud::SecretManager::V1::UpdateSecretRequest | Hash]
459
- # Updates metadata of an existing {Google::Cloud::SecretManager::V1::Secret Secret}.
460
- # @param options [Gapic::CallOptions, Hash]
479
+ # Pass arguments to `update_secret` via a request object, either of type
480
+ # {::Google::Cloud::SecretManager::V1::UpdateSecretRequest} or an equivalent Hash.
481
+ #
482
+ # @param request [::Google::Cloud::SecretManager::V1::UpdateSecretRequest, ::Hash]
483
+ # A request object representing the call parameters. Required. To specify no
484
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
485
+ # @param options [::Gapic::CallOptions, ::Hash]
461
486
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
462
487
  #
463
488
  # @overload update_secret(secret: nil, update_mask: nil)
464
- # @param secret [Google::Cloud::SecretManager::V1::Secret | Hash]
465
- # Required. {Google::Cloud::SecretManager::V1::Secret Secret} with updated field values.
466
- # @param update_mask [Google::Protobuf::FieldMask | Hash]
467
- # Required. Specifies the fields to be updated.
489
+ # Pass arguments to `update_secret` via keyword arguments. Note that at
490
+ # least one keyword argument is required. To specify no parameters, or to keep all
491
+ # the default parameter values, pass an empty Hash as a request object (see above).
468
492
  #
493
+ # @param secret [::Google::Cloud::SecretManager::V1::Secret, ::Hash]
494
+ # Required. {::Google::Cloud::SecretManager::V1::Secret Secret} with updated field values.
495
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
496
+ # Required. Specifies the fields to be updated.
469
497
  #
470
498
  # @yield [response, operation] Access the result along with the RPC operation
471
- # @yieldparam response [Google::Cloud::SecretManager::V1::Secret]
472
- # @yieldparam operation [GRPC::ActiveCall::Operation]
499
+ # @yieldparam response [::Google::Cloud::SecretManager::V1::Secret]
500
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
473
501
  #
474
- # @return [Google::Cloud::SecretManager::V1::Secret]
502
+ # @return [::Google::Cloud::SecretManager::V1::Secret]
475
503
  #
476
- # @raise [Google::Cloud::Error] if the RPC is aborted.
504
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
477
505
  #
478
506
  def update_secret request, options = nil
479
- raise ArgumentError, "request must be provided" if request.nil?
507
+ raise ::ArgumentError, "request must be provided" if request.nil?
480
508
 
481
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::UpdateSecretRequest
509
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::UpdateSecretRequest
482
510
 
483
511
  # Converts hash and nil to an options object
484
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
512
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
485
513
 
486
514
  # Customize the options with defaults
487
515
  metadata = @config.rpcs.update_secret.metadata.to_h
488
516
 
489
517
  # Set x-goog-api-client and x-goog-user-project headers
490
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
518
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
491
519
  lib_name: @config.lib_name, lib_version: @config.lib_version,
492
520
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
493
521
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -508,46 +536,53 @@ module Google
508
536
  yield response, operation if block_given?
509
537
  return response
510
538
  end
511
- rescue GRPC::BadStatus => e
512
- raise Google::Cloud::Error.from_error(e)
539
+ rescue ::GRPC::BadStatus => e
540
+ raise ::Google::Cloud::Error.from_error(e)
513
541
  end
514
542
 
515
543
  ##
516
- # Deletes a {Google::Cloud::SecretManager::V1::Secret Secret}.
544
+ # Deletes a {::Google::Cloud::SecretManager::V1::Secret Secret}.
517
545
  #
518
546
  # @overload delete_secret(request, options = nil)
519
- # @param request [Google::Cloud::SecretManager::V1::DeleteSecretRequest | Hash]
520
- # Deletes a {Google::Cloud::SecretManager::V1::Secret Secret}.
521
- # @param options [Gapic::CallOptions, Hash]
547
+ # Pass arguments to `delete_secret` via a request object, either of type
548
+ # {::Google::Cloud::SecretManager::V1::DeleteSecretRequest} or an equivalent Hash.
549
+ #
550
+ # @param request [::Google::Cloud::SecretManager::V1::DeleteSecretRequest, ::Hash]
551
+ # A request object representing the call parameters. Required. To specify no
552
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
553
+ # @param options [::Gapic::CallOptions, ::Hash]
522
554
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
523
555
  #
524
556
  # @overload delete_secret(name: nil)
525
- # @param name [String]
526
- # Required. The resource name of the {Google::Cloud::SecretManager::V1::Secret Secret} to delete in the format
527
- # `projects/*/secrets/*`.
557
+ # Pass arguments to `delete_secret` via keyword arguments. Note that at
558
+ # least one keyword argument is required. To specify no parameters, or to keep all
559
+ # the default parameter values, pass an empty Hash as a request object (see above).
528
560
  #
561
+ # @param name [::String]
562
+ # Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret} to delete in the format
563
+ # `projects/*/secrets/*`.
529
564
  #
530
565
  # @yield [response, operation] Access the result along with the RPC operation
531
- # @yieldparam response [Google::Protobuf::Empty]
532
- # @yieldparam operation [GRPC::ActiveCall::Operation]
566
+ # @yieldparam response [::Google::Protobuf::Empty]
567
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
533
568
  #
534
- # @return [Google::Protobuf::Empty]
569
+ # @return [::Google::Protobuf::Empty]
535
570
  #
536
- # @raise [Google::Cloud::Error] if the RPC is aborted.
571
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
537
572
  #
538
573
  def delete_secret request, options = nil
539
- raise ArgumentError, "request must be provided" if request.nil?
574
+ raise ::ArgumentError, "request must be provided" if request.nil?
540
575
 
541
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::DeleteSecretRequest
576
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::DeleteSecretRequest
542
577
 
543
578
  # Converts hash and nil to an options object
544
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
579
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
545
580
 
546
581
  # Customize the options with defaults
547
582
  metadata = @config.rpcs.delete_secret.metadata.to_h
548
583
 
549
584
  # Set x-goog-api-client and x-goog-user-project headers
550
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
585
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
551
586
  lib_name: @config.lib_name, lib_version: @config.lib_version,
552
587
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
553
588
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -568,56 +603,62 @@ module Google
568
603
  yield response, operation if block_given?
569
604
  return response
570
605
  end
571
- rescue GRPC::BadStatus => e
572
- raise Google::Cloud::Error.from_error(e)
606
+ rescue ::GRPC::BadStatus => e
607
+ raise ::Google::Cloud::Error.from_error(e)
573
608
  end
574
609
 
575
610
  ##
576
- # Lists {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}. This call does not return secret
611
+ # Lists {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}. This call does not return secret
577
612
  # data.
578
613
  #
579
614
  # @overload list_secret_versions(request, options = nil)
580
- # @param request [Google::Cloud::SecretManager::V1::ListSecretVersionsRequest | Hash]
581
- # Lists {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions}. This call does not return secret
582
- # data.
583
- # @param options [Gapic::CallOptions, Hash]
615
+ # Pass arguments to `list_secret_versions` via a request object, either of type
616
+ # {::Google::Cloud::SecretManager::V1::ListSecretVersionsRequest} or an equivalent Hash.
617
+ #
618
+ # @param request [::Google::Cloud::SecretManager::V1::ListSecretVersionsRequest, ::Hash]
619
+ # A request object representing the call parameters. Required. To specify no
620
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
621
+ # @param options [::Gapic::CallOptions, ::Hash]
584
622
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
585
623
  #
586
624
  # @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil)
587
- # @param parent [String]
588
- # Required. The resource name of the {Google::Cloud::SecretManager::V1::Secret Secret} associated with the
589
- # {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} to list, in the format
625
+ # Pass arguments to `list_secret_versions` via keyword arguments. Note that at
626
+ # least one keyword argument is required. To specify no parameters, or to keep all
627
+ # the default parameter values, pass an empty Hash as a request object (see above).
628
+ #
629
+ # @param parent [::String]
630
+ # Required. The resource name of the {::Google::Cloud::SecretManager::V1::Secret Secret} associated with the
631
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} to list, in the format
590
632
  # `projects/*/secrets/*`.
591
- # @param page_size [Integer]
633
+ # @param page_size [::Integer]
592
634
  # Optional. The maximum number of results to be returned in a single page. If
593
635
  # set to 0, the server decides the number of results to return. If the
594
636
  # number is greater than 25000, it is capped at 25000.
595
- # @param page_token [String]
637
+ # @param page_token [::String]
596
638
  # Optional. Pagination token, returned earlier via
597
639
  # ListSecretVersionsResponse.next_page_token][].
598
640
  #
599
- #
600
641
  # @yield [response, operation] Access the result along with the RPC operation
601
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::SecretManager::V1::SecretVersion>]
602
- # @yieldparam operation [GRPC::ActiveCall::Operation]
642
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1::SecretVersion>]
643
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
603
644
  #
604
- # @return [Gapic::PagedEnumerable<Google::Cloud::SecretManager::V1::SecretVersion>]
645
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1::SecretVersion>]
605
646
  #
606
- # @raise [Google::Cloud::Error] if the RPC is aborted.
647
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
607
648
  #
608
649
  def list_secret_versions request, options = nil
609
- raise ArgumentError, "request must be provided" if request.nil?
650
+ raise ::ArgumentError, "request must be provided" if request.nil?
610
651
 
611
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::ListSecretVersionsRequest
652
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::ListSecretVersionsRequest
612
653
 
613
654
  # Converts hash and nil to an options object
614
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
655
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
615
656
 
616
657
  # Customize the options with defaults
617
658
  metadata = @config.rpcs.list_secret_versions.metadata.to_h
618
659
 
619
660
  # Set x-goog-api-client and x-goog-user-project headers
620
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
661
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
621
662
  lib_name: @config.lib_name, lib_version: @config.lib_version,
622
663
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
623
664
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -635,58 +676,62 @@ module Google
635
676
  retry_policy: @config.retry_policy
636
677
 
637
678
  @secret_manager_service_stub.call_rpc :list_secret_versions, request, options: options do |response, operation|
638
- response = Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, request, response, operation, options
679
+ response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, request, response, operation, options
639
680
  yield response, operation if block_given?
640
681
  return response
641
682
  end
642
- rescue GRPC::BadStatus => e
643
- raise Google::Cloud::Error.from_error(e)
683
+ rescue ::GRPC::BadStatus => e
684
+ raise ::Google::Cloud::Error.from_error(e)
644
685
  end
645
686
 
646
687
  ##
647
- # Gets metadata for a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
688
+ # Gets metadata for a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
648
689
  #
649
690
  # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
650
- # {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
691
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
651
692
  #
652
693
  # @overload get_secret_version(request, options = nil)
653
- # @param request [Google::Cloud::SecretManager::V1::GetSecretVersionRequest | Hash]
654
- # Gets metadata for a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
694
+ # Pass arguments to `get_secret_version` via a request object, either of type
695
+ # {::Google::Cloud::SecretManager::V1::GetSecretVersionRequest} or an equivalent Hash.
655
696
  #
656
- # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
657
- # {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
658
- # @param options [Gapic::CallOptions, Hash]
697
+ # @param request [::Google::Cloud::SecretManager::V1::GetSecretVersionRequest, ::Hash]
698
+ # A request object representing the call parameters. Required. To specify no
699
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
700
+ # @param options [::Gapic::CallOptions, ::Hash]
659
701
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
660
702
  #
661
703
  # @overload get_secret_version(name: nil)
662
- # @param name [String]
663
- # Required. The resource name of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
704
+ # Pass arguments to `get_secret_version` via keyword arguments. Note that at
705
+ # least one keyword argument is required. To specify no parameters, or to keep all
706
+ # the default parameter values, pass an empty Hash as a request object (see above).
707
+ #
708
+ # @param name [::String]
709
+ # Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
664
710
  # `projects/*/secrets/*/versions/*`.
665
711
  # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
666
- # {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
667
- #
712
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
668
713
  #
669
714
  # @yield [response, operation] Access the result along with the RPC operation
670
- # @yieldparam response [Google::Cloud::SecretManager::V1::SecretVersion]
671
- # @yieldparam operation [GRPC::ActiveCall::Operation]
715
+ # @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
716
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
672
717
  #
673
- # @return [Google::Cloud::SecretManager::V1::SecretVersion]
718
+ # @return [::Google::Cloud::SecretManager::V1::SecretVersion]
674
719
  #
675
- # @raise [Google::Cloud::Error] if the RPC is aborted.
720
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
676
721
  #
677
722
  def get_secret_version request, options = nil
678
- raise ArgumentError, "request must be provided" if request.nil?
723
+ raise ::ArgumentError, "request must be provided" if request.nil?
679
724
 
680
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::GetSecretVersionRequest
725
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::GetSecretVersionRequest
681
726
 
682
727
  # Converts hash and nil to an options object
683
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
728
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
684
729
 
685
730
  # Customize the options with defaults
686
731
  metadata = @config.rpcs.get_secret_version.metadata.to_h
687
732
 
688
733
  # Set x-goog-api-client and x-goog-user-project headers
689
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
734
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
690
735
  lib_name: @config.lib_name, lib_version: @config.lib_version,
691
736
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
692
737
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -707,52 +752,56 @@ module Google
707
752
  yield response, operation if block_given?
708
753
  return response
709
754
  end
710
- rescue GRPC::BadStatus => e
711
- raise Google::Cloud::Error.from_error(e)
755
+ rescue ::GRPC::BadStatus => e
756
+ raise ::Google::Cloud::Error.from_error(e)
712
757
  end
713
758
 
714
759
  ##
715
- # Accesses a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. This call returns the secret data.
760
+ # Accesses a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. This call returns the secret data.
716
761
  #
717
762
  # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
718
- # {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
763
+ # {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
719
764
  #
720
765
  # @overload access_secret_version(request, options = nil)
721
- # @param request [Google::Cloud::SecretManager::V1::AccessSecretVersionRequest | Hash]
722
- # Accesses a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}. This call returns the secret data.
766
+ # Pass arguments to `access_secret_version` via a request object, either of type
767
+ # {::Google::Cloud::SecretManager::V1::AccessSecretVersionRequest} or an equivalent Hash.
723
768
  #
724
- # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
725
- # {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
726
- # @param options [Gapic::CallOptions, Hash]
769
+ # @param request [::Google::Cloud::SecretManager::V1::AccessSecretVersionRequest, ::Hash]
770
+ # A request object representing the call parameters. Required. To specify no
771
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
772
+ # @param options [::Gapic::CallOptions, ::Hash]
727
773
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
728
774
  #
729
775
  # @overload access_secret_version(name: nil)
730
- # @param name [String]
731
- # Required. The resource name of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
732
- # `projects/*/secrets/*/versions/*`.
776
+ # Pass arguments to `access_secret_version` via keyword arguments. Note that at
777
+ # least one keyword argument is required. To specify no parameters, or to keep all
778
+ # the default parameter values, pass an empty Hash as a request object (see above).
733
779
  #
780
+ # @param name [::String]
781
+ # Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} in the format
782
+ # `projects/*/secrets/*/versions/*`.
734
783
  #
735
784
  # @yield [response, operation] Access the result along with the RPC operation
736
- # @yieldparam response [Google::Cloud::SecretManager::V1::AccessSecretVersionResponse]
737
- # @yieldparam operation [GRPC::ActiveCall::Operation]
785
+ # @yieldparam response [::Google::Cloud::SecretManager::V1::AccessSecretVersionResponse]
786
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
738
787
  #
739
- # @return [Google::Cloud::SecretManager::V1::AccessSecretVersionResponse]
788
+ # @return [::Google::Cloud::SecretManager::V1::AccessSecretVersionResponse]
740
789
  #
741
- # @raise [Google::Cloud::Error] if the RPC is aborted.
790
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
742
791
  #
743
792
  def access_secret_version request, options = nil
744
- raise ArgumentError, "request must be provided" if request.nil?
793
+ raise ::ArgumentError, "request must be provided" if request.nil?
745
794
 
746
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::AccessSecretVersionRequest
795
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::AccessSecretVersionRequest
747
796
 
748
797
  # Converts hash and nil to an options object
749
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
798
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
750
799
 
751
800
  # Customize the options with defaults
752
801
  metadata = @config.rpcs.access_secret_version.metadata.to_h
753
802
 
754
803
  # Set x-goog-api-client and x-goog-user-project headers
755
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
804
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
756
805
  lib_name: @config.lib_name, lib_version: @config.lib_version,
757
806
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
758
807
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -773,52 +822,56 @@ module Google
773
822
  yield response, operation if block_given?
774
823
  return response
775
824
  end
776
- rescue GRPC::BadStatus => e
777
- raise Google::Cloud::Error.from_error(e)
825
+ rescue ::GRPC::BadStatus => e
826
+ raise ::Google::Cloud::Error.from_error(e)
778
827
  end
779
828
 
780
829
  ##
781
- # Disables a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
830
+ # Disables a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
782
831
  #
783
- # Sets the {Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
784
- # {Google::Cloud::SecretManager::V1::SecretVersion::State::DISABLED DISABLED}.
832
+ # Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
833
+ # {::Google::Cloud::SecretManager::V1::SecretVersion::State::DISABLED DISABLED}.
785
834
  #
786
835
  # @overload disable_secret_version(request, options = nil)
787
- # @param request [Google::Cloud::SecretManager::V1::DisableSecretVersionRequest | Hash]
788
- # Disables a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
836
+ # Pass arguments to `disable_secret_version` via a request object, either of type
837
+ # {::Google::Cloud::SecretManager::V1::DisableSecretVersionRequest} or an equivalent Hash.
789
838
  #
790
- # Sets the {Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
791
- # {Google::Cloud::SecretManager::V1::SecretVersion::State::DISABLED DISABLED}.
792
- # @param options [Gapic::CallOptions, Hash]
839
+ # @param request [::Google::Cloud::SecretManager::V1::DisableSecretVersionRequest, ::Hash]
840
+ # A request object representing the call parameters. Required. To specify no
841
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
842
+ # @param options [::Gapic::CallOptions, ::Hash]
793
843
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
794
844
  #
795
845
  # @overload disable_secret_version(name: nil)
796
- # @param name [String]
797
- # Required. The resource name of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to disable in the format
798
- # `projects/*/secrets/*/versions/*`.
846
+ # Pass arguments to `disable_secret_version` via keyword arguments. Note that at
847
+ # least one keyword argument is required. To specify no parameters, or to keep all
848
+ # the default parameter values, pass an empty Hash as a request object (see above).
799
849
  #
850
+ # @param name [::String]
851
+ # Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to disable in the format
852
+ # `projects/*/secrets/*/versions/*`.
800
853
  #
801
854
  # @yield [response, operation] Access the result along with the RPC operation
802
- # @yieldparam response [Google::Cloud::SecretManager::V1::SecretVersion]
803
- # @yieldparam operation [GRPC::ActiveCall::Operation]
855
+ # @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
856
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
804
857
  #
805
- # @return [Google::Cloud::SecretManager::V1::SecretVersion]
858
+ # @return [::Google::Cloud::SecretManager::V1::SecretVersion]
806
859
  #
807
- # @raise [Google::Cloud::Error] if the RPC is aborted.
860
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
808
861
  #
809
862
  def disable_secret_version request, options = nil
810
- raise ArgumentError, "request must be provided" if request.nil?
863
+ raise ::ArgumentError, "request must be provided" if request.nil?
811
864
 
812
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::DisableSecretVersionRequest
865
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::DisableSecretVersionRequest
813
866
 
814
867
  # Converts hash and nil to an options object
815
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
868
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
816
869
 
817
870
  # Customize the options with defaults
818
871
  metadata = @config.rpcs.disable_secret_version.metadata.to_h
819
872
 
820
873
  # Set x-goog-api-client and x-goog-user-project headers
821
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
874
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
822
875
  lib_name: @config.lib_name, lib_version: @config.lib_version,
823
876
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
824
877
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -839,52 +892,56 @@ module Google
839
892
  yield response, operation if block_given?
840
893
  return response
841
894
  end
842
- rescue GRPC::BadStatus => e
843
- raise Google::Cloud::Error.from_error(e)
895
+ rescue ::GRPC::BadStatus => e
896
+ raise ::Google::Cloud::Error.from_error(e)
844
897
  end
845
898
 
846
899
  ##
847
- # Enables a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
900
+ # Enables a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
848
901
  #
849
- # Sets the {Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
850
- # {Google::Cloud::SecretManager::V1::SecretVersion::State::ENABLED ENABLED}.
902
+ # Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
903
+ # {::Google::Cloud::SecretManager::V1::SecretVersion::State::ENABLED ENABLED}.
851
904
  #
852
905
  # @overload enable_secret_version(request, options = nil)
853
- # @param request [Google::Cloud::SecretManager::V1::EnableSecretVersionRequest | Hash]
854
- # Enables a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
906
+ # Pass arguments to `enable_secret_version` via a request object, either of type
907
+ # {::Google::Cloud::SecretManager::V1::EnableSecretVersionRequest} or an equivalent Hash.
855
908
  #
856
- # Sets the {Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
857
- # {Google::Cloud::SecretManager::V1::SecretVersion::State::ENABLED ENABLED}.
858
- # @param options [Gapic::CallOptions, Hash]
909
+ # @param request [::Google::Cloud::SecretManager::V1::EnableSecretVersionRequest, ::Hash]
910
+ # A request object representing the call parameters. Required. To specify no
911
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
912
+ # @param options [::Gapic::CallOptions, ::Hash]
859
913
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
860
914
  #
861
915
  # @overload enable_secret_version(name: nil)
862
- # @param name [String]
863
- # Required. The resource name of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to enable in the format
864
- # `projects/*/secrets/*/versions/*`.
916
+ # Pass arguments to `enable_secret_version` via keyword arguments. Note that at
917
+ # least one keyword argument is required. To specify no parameters, or to keep all
918
+ # the default parameter values, pass an empty Hash as a request object (see above).
865
919
  #
920
+ # @param name [::String]
921
+ # Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to enable in the format
922
+ # `projects/*/secrets/*/versions/*`.
866
923
  #
867
924
  # @yield [response, operation] Access the result along with the RPC operation
868
- # @yieldparam response [Google::Cloud::SecretManager::V1::SecretVersion]
869
- # @yieldparam operation [GRPC::ActiveCall::Operation]
925
+ # @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
926
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
870
927
  #
871
- # @return [Google::Cloud::SecretManager::V1::SecretVersion]
928
+ # @return [::Google::Cloud::SecretManager::V1::SecretVersion]
872
929
  #
873
- # @raise [Google::Cloud::Error] if the RPC is aborted.
930
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
874
931
  #
875
932
  def enable_secret_version request, options = nil
876
- raise ArgumentError, "request must be provided" if request.nil?
933
+ raise ::ArgumentError, "request must be provided" if request.nil?
877
934
 
878
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::EnableSecretVersionRequest
935
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::EnableSecretVersionRequest
879
936
 
880
937
  # Converts hash and nil to an options object
881
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
938
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
882
939
 
883
940
  # Customize the options with defaults
884
941
  metadata = @config.rpcs.enable_secret_version.metadata.to_h
885
942
 
886
943
  # Set x-goog-api-client and x-goog-user-project headers
887
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
944
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
888
945
  lib_name: @config.lib_name, lib_version: @config.lib_version,
889
946
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
890
947
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -905,54 +962,57 @@ module Google
905
962
  yield response, operation if block_given?
906
963
  return response
907
964
  end
908
- rescue GRPC::BadStatus => e
909
- raise Google::Cloud::Error.from_error(e)
965
+ rescue ::GRPC::BadStatus => e
966
+ raise ::Google::Cloud::Error.from_error(e)
910
967
  end
911
968
 
912
969
  ##
913
- # Destroys a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
970
+ # Destroys a {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
914
971
  #
915
- # Sets the {Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
916
- # {Google::Cloud::SecretManager::V1::SecretVersion::State::DESTROYED DESTROYED} and irrevocably destroys the
972
+ # Sets the {::Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
973
+ # {::Google::Cloud::SecretManager::V1::SecretVersion::State::DESTROYED DESTROYED} and irrevocably destroys the
917
974
  # secret data.
918
975
  #
919
976
  # @overload destroy_secret_version(request, options = nil)
920
- # @param request [Google::Cloud::SecretManager::V1::DestroySecretVersionRequest | Hash]
921
- # Destroys a {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion}.
977
+ # Pass arguments to `destroy_secret_version` via a request object, either of type
978
+ # {::Google::Cloud::SecretManager::V1::DestroySecretVersionRequest} or an equivalent Hash.
922
979
  #
923
- # Sets the {Google::Cloud::SecretManager::V1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to
924
- # {Google::Cloud::SecretManager::V1::SecretVersion::State::DESTROYED DESTROYED} and irrevocably destroys the
925
- # secret data.
926
- # @param options [Gapic::CallOptions, Hash]
980
+ # @param request [::Google::Cloud::SecretManager::V1::DestroySecretVersionRequest, ::Hash]
981
+ # A request object representing the call parameters. Required. To specify no
982
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
983
+ # @param options [::Gapic::CallOptions, ::Hash]
927
984
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
928
985
  #
929
986
  # @overload destroy_secret_version(name: nil)
930
- # @param name [String]
931
- # Required. The resource name of the {Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to destroy in the format
932
- # `projects/*/secrets/*/versions/*`.
987
+ # Pass arguments to `destroy_secret_version` via keyword arguments. Note that at
988
+ # least one keyword argument is required. To specify no parameters, or to keep all
989
+ # the default parameter values, pass an empty Hash as a request object (see above).
933
990
  #
991
+ # @param name [::String]
992
+ # Required. The resource name of the {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersion} to destroy in the format
993
+ # `projects/*/secrets/*/versions/*`.
934
994
  #
935
995
  # @yield [response, operation] Access the result along with the RPC operation
936
- # @yieldparam response [Google::Cloud::SecretManager::V1::SecretVersion]
937
- # @yieldparam operation [GRPC::ActiveCall::Operation]
996
+ # @yieldparam response [::Google::Cloud::SecretManager::V1::SecretVersion]
997
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
938
998
  #
939
- # @return [Google::Cloud::SecretManager::V1::SecretVersion]
999
+ # @return [::Google::Cloud::SecretManager::V1::SecretVersion]
940
1000
  #
941
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1001
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
942
1002
  #
943
1003
  def destroy_secret_version request, options = nil
944
- raise ArgumentError, "request must be provided" if request.nil?
1004
+ raise ::ArgumentError, "request must be provided" if request.nil?
945
1005
 
946
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1::DestroySecretVersionRequest
1006
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1::DestroySecretVersionRequest
947
1007
 
948
1008
  # Converts hash and nil to an options object
949
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1009
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
950
1010
 
951
1011
  # Customize the options with defaults
952
1012
  metadata = @config.rpcs.destroy_secret_version.metadata.to_h
953
1013
 
954
1014
  # Set x-goog-api-client and x-goog-user-project headers
955
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1015
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
956
1016
  lib_name: @config.lib_name, lib_version: @config.lib_version,
957
1017
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
958
1018
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -973,60 +1033,62 @@ module Google
973
1033
  yield response, operation if block_given?
974
1034
  return response
975
1035
  end
976
- rescue GRPC::BadStatus => e
977
- raise Google::Cloud::Error.from_error(e)
1036
+ rescue ::GRPC::BadStatus => e
1037
+ raise ::Google::Cloud::Error.from_error(e)
978
1038
  end
979
1039
 
980
1040
  ##
981
1041
  # Sets the access control policy on the specified secret. Replaces any
982
1042
  # existing policy.
983
1043
  #
984
- # Permissions on {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} are enforced according
985
- # to the policy set on the associated {Google::Cloud::SecretManager::V1::Secret Secret}.
1044
+ # Permissions on {::Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} are enforced according
1045
+ # to the policy set on the associated {::Google::Cloud::SecretManager::V1::Secret Secret}.
986
1046
  #
987
1047
  # @overload set_iam_policy(request, options = nil)
988
- # @param request [Google::Iam::V1::SetIamPolicyRequest | Hash]
989
- # Sets the access control policy on the specified secret. Replaces any
990
- # existing policy.
1048
+ # Pass arguments to `set_iam_policy` via a request object, either of type
1049
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
991
1050
  #
992
- # Permissions on {Google::Cloud::SecretManager::V1::SecretVersion SecretVersions} are enforced according
993
- # to the policy set on the associated {Google::Cloud::SecretManager::V1::Secret Secret}.
994
- # @param options [Gapic::CallOptions, Hash]
1051
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
1052
+ # A request object representing the call parameters. Required. To specify no
1053
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1054
+ # @param options [::Gapic::CallOptions, ::Hash]
995
1055
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
996
1056
  #
997
1057
  # @overload set_iam_policy(resource: nil, policy: nil)
998
- # @param resource [String]
1058
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
1059
+ # least one keyword argument is required. To specify no parameters, or to keep all
1060
+ # the default parameter values, pass an empty Hash as a request object (see above).
1061
+ #
1062
+ # @param resource [::String]
999
1063
  # REQUIRED: The resource for which the policy is being specified.
1000
- # `resource` is usually specified as a path. For example, a Project
1001
- # resource is specified as `projects/{project}`.
1002
- # @param policy [Google::Iam::V1::Policy | Hash]
1064
+ # See the operation documentation for the appropriate value for this field.
1065
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
1003
1066
  # REQUIRED: The complete policy to be applied to the `resource`. The size of
1004
1067
  # the policy is limited to a few 10s of KB. An empty policy is a
1005
1068
  # valid policy but certain Cloud Platform services (such as Projects)
1006
1069
  # might reject them.
1007
1070
  #
1008
- #
1009
1071
  # @yield [response, operation] Access the result along with the RPC operation
1010
- # @yieldparam response [Google::Iam::V1::Policy]
1011
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1072
+ # @yieldparam response [::Google::Iam::V1::Policy]
1073
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1012
1074
  #
1013
- # @return [Google::Iam::V1::Policy]
1075
+ # @return [::Google::Iam::V1::Policy]
1014
1076
  #
1015
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1077
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1016
1078
  #
1017
1079
  def set_iam_policy request, options = nil
1018
- raise ArgumentError, "request must be provided" if request.nil?
1080
+ raise ::ArgumentError, "request must be provided" if request.nil?
1019
1081
 
1020
- request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::SetIamPolicyRequest
1082
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
1021
1083
 
1022
1084
  # Converts hash and nil to an options object
1023
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1085
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1024
1086
 
1025
1087
  # Customize the options with defaults
1026
1088
  metadata = @config.rpcs.set_iam_policy.metadata.to_h
1027
1089
 
1028
1090
  # Set x-goog-api-client and x-goog-user-project headers
1029
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1091
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1030
1092
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1031
1093
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
1032
1094
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1047,8 +1109,8 @@ module Google
1047
1109
  yield response, operation if block_given?
1048
1110
  return response
1049
1111
  end
1050
- rescue GRPC::BadStatus => e
1051
- raise Google::Cloud::Error.from_error(e)
1112
+ rescue ::GRPC::BadStatus => e
1113
+ raise ::Google::Cloud::Error.from_error(e)
1052
1114
  end
1053
1115
 
1054
1116
  ##
@@ -1056,40 +1118,48 @@ module Google
1056
1118
  # Returns empty policy if the secret exists and does not have a policy set.
1057
1119
  #
1058
1120
  # @overload get_iam_policy(request, options = nil)
1059
- # @param request [Google::Iam::V1::GetIamPolicyRequest | Hash]
1060
- # Gets the access control policy for a secret.
1061
- # Returns empty policy if the secret exists and does not have a policy set.
1062
- # @param options [Gapic::CallOptions, Hash]
1121
+ # Pass arguments to `get_iam_policy` via a request object, either of type
1122
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
1123
+ #
1124
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
1125
+ # A request object representing the call parameters. Required. To specify no
1126
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1127
+ # @param options [::Gapic::CallOptions, ::Hash]
1063
1128
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1064
1129
  #
1065
- # @overload get_iam_policy(resource: nil)
1066
- # @param resource [String]
1067
- # REQUIRED: The resource for which the policy is being requested.
1068
- # `resource` is usually specified as a path. For example, a Project
1069
- # resource is specified as `projects/{project}`.
1130
+ # @overload get_iam_policy(resource: nil, options: nil)
1131
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
1132
+ # least one keyword argument is required. To specify no parameters, or to keep all
1133
+ # the default parameter values, pass an empty Hash as a request object (see above).
1070
1134
  #
1135
+ # @param resource [::String]
1136
+ # REQUIRED: The resource for which the policy is being requested.
1137
+ # See the operation documentation for the appropriate value for this field.
1138
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
1139
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
1140
+ # `GetIamPolicy`. This field is only used by Cloud IAM.
1071
1141
  #
1072
1142
  # @yield [response, operation] Access the result along with the RPC operation
1073
- # @yieldparam response [Google::Iam::V1::Policy]
1074
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1143
+ # @yieldparam response [::Google::Iam::V1::Policy]
1144
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1075
1145
  #
1076
- # @return [Google::Iam::V1::Policy]
1146
+ # @return [::Google::Iam::V1::Policy]
1077
1147
  #
1078
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1148
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1079
1149
  #
1080
1150
  def get_iam_policy request, options = nil
1081
- raise ArgumentError, "request must be provided" if request.nil?
1151
+ raise ::ArgumentError, "request must be provided" if request.nil?
1082
1152
 
1083
- request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::GetIamPolicyRequest
1153
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
1084
1154
 
1085
1155
  # Converts hash and nil to an options object
1086
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1156
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1087
1157
 
1088
1158
  # Customize the options with defaults
1089
1159
  metadata = @config.rpcs.get_iam_policy.metadata.to_h
1090
1160
 
1091
1161
  # Set x-goog-api-client and x-goog-user-project headers
1092
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1162
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1093
1163
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1094
1164
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
1095
1165
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1110,8 +1180,8 @@ module Google
1110
1180
  yield response, operation if block_given?
1111
1181
  return response
1112
1182
  end
1113
- rescue GRPC::BadStatus => e
1114
- raise Google::Cloud::Error.from_error(e)
1183
+ rescue ::GRPC::BadStatus => e
1184
+ raise ::Google::Cloud::Error.from_error(e)
1115
1185
  end
1116
1186
 
1117
1187
  ##
@@ -1124,50 +1194,50 @@ module Google
1124
1194
  # may "fail open" without warning.
1125
1195
  #
1126
1196
  # @overload test_iam_permissions(request, options = nil)
1127
- # @param request [Google::Iam::V1::TestIamPermissionsRequest | Hash]
1128
- # Returns permissions that a caller has for the specified secret.
1129
- # If the secret does not exist, this call returns an empty set of
1130
- # permissions, not a NOT_FOUND error.
1131
- #
1132
- # Note: This operation is designed to be used for building permission-aware
1133
- # UIs and command-line tools, not for authorization checking. This operation
1134
- # may "fail open" without warning.
1135
- # @param options [Gapic::CallOptions, Hash]
1197
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
1198
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
1199
+ #
1200
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
1201
+ # A request object representing the call parameters. Required. To specify no
1202
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1203
+ # @param options [::Gapic::CallOptions, ::Hash]
1136
1204
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1137
1205
  #
1138
1206
  # @overload test_iam_permissions(resource: nil, permissions: nil)
1139
- # @param resource [String]
1207
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
1208
+ # least one keyword argument is required. To specify no parameters, or to keep all
1209
+ # the default parameter values, pass an empty Hash as a request object (see above).
1210
+ #
1211
+ # @param resource [::String]
1140
1212
  # REQUIRED: The resource for which the policy detail is being requested.
1141
- # `resource` is usually specified as a path. For example, a Project
1142
- # resource is specified as `projects/{project}`.
1143
- # @param permissions [Array<String>]
1213
+ # See the operation documentation for the appropriate value for this field.
1214
+ # @param permissions [::Array<::String>]
1144
1215
  # The set of permissions to check for the `resource`. Permissions with
1145
1216
  # wildcards (such as '*' or 'storage.*') are not allowed. For more
1146
1217
  # information see
1147
1218
  # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
1148
1219
  #
1149
- #
1150
1220
  # @yield [response, operation] Access the result along with the RPC operation
1151
- # @yieldparam response [Google::Iam::V1::TestIamPermissionsResponse]
1152
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1221
+ # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
1222
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1153
1223
  #
1154
- # @return [Google::Iam::V1::TestIamPermissionsResponse]
1224
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
1155
1225
  #
1156
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1226
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1157
1227
  #
1158
1228
  def test_iam_permissions request, options = nil
1159
- raise ArgumentError, "request must be provided" if request.nil?
1229
+ raise ::ArgumentError, "request must be provided" if request.nil?
1160
1230
 
1161
- request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::TestIamPermissionsRequest
1231
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
1162
1232
 
1163
1233
  # Converts hash and nil to an options object
1164
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1234
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1165
1235
 
1166
1236
  # Customize the options with defaults
1167
1237
  metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1168
1238
 
1169
1239
  # Set x-goog-api-client and x-goog-user-project headers
1170
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1240
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1171
1241
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1172
1242
  gapic_version: ::Google::Cloud::SecretManager::V1::VERSION
1173
1243
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1188,8 +1258,8 @@ module Google
1188
1258
  yield response, operation if block_given?
1189
1259
  return response
1190
1260
  end
1191
- rescue GRPC::BadStatus => e
1192
- raise Google::Cloud::Error.from_error(e)
1261
+ rescue ::GRPC::BadStatus => e
1262
+ raise ::Google::Cloud::Error.from_error(e)
1193
1263
  end
1194
1264
 
1195
1265
  ##
@@ -1199,7 +1269,7 @@ module Google
1199
1269
  # providing control over timeouts, retry behavior, logging, transport
1200
1270
  # parameters, and other low-level controls. Certain parameters can also be
1201
1271
  # applied individually to specific RPCs. See
1202
- # {Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration::Rpcs}
1272
+ # {::Google::Cloud::SecretManager::V1::SecretManagerService::Client::Configuration::Rpcs}
1203
1273
  # for a list of RPCs that can be configured independently.
1204
1274
  #
1205
1275
  # Configuration can be applied globally to all clients, or to a single client
@@ -1210,22 +1280,22 @@ module Google
1210
1280
  # To modify the global config, setting the timeout for list_secrets
1211
1281
  # to 20 seconds, and all remaining timeouts to 10 seconds:
1212
1282
  #
1213
- # Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
1214
- # config.timeout = 10_000
1215
- # config.rpcs.list_secrets.timeout = 20_000
1283
+ # ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.configure do |config|
1284
+ # config.timeout = 10.0
1285
+ # config.rpcs.list_secrets.timeout = 20.0
1216
1286
  # end
1217
1287
  #
1218
1288
  # To apply the above configuration only to a new client:
1219
1289
  #
1220
- # client = Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
1221
- # config.timeout = 10_000
1222
- # config.rpcs.list_secrets.timeout = 20_000
1290
+ # client = ::Google::Cloud::SecretManager::V1::SecretManagerService::Client.new do |config|
1291
+ # config.timeout = 10.0
1292
+ # config.rpcs.list_secrets.timeout = 20.0
1223
1293
  # end
1224
1294
  #
1225
1295
  # @!attribute [rw] endpoint
1226
1296
  # The hostname or hostname:port of the service endpoint.
1227
1297
  # Defaults to `"secretmanager.googleapis.com"`.
1228
- # @return [String]
1298
+ # @return [::String]
1229
1299
  # @!attribute [rw] credentials
1230
1300
  # Credentials to send with calls. You may provide any of the following types:
1231
1301
  # * (`String`) The path to a service account key file in JSON format
@@ -1237,29 +1307,29 @@ module Google
1237
1307
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1238
1308
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1239
1309
  # * (`nil`) indicating no credentials
1240
- # @return [Object]
1310
+ # @return [::Object]
1241
1311
  # @!attribute [rw] scope
1242
1312
  # The OAuth scopes
1243
- # @return [Array<String>]
1313
+ # @return [::Array<::String>]
1244
1314
  # @!attribute [rw] lib_name
1245
1315
  # The library name as recorded in instrumentation and logging
1246
- # @return [String]
1316
+ # @return [::String]
1247
1317
  # @!attribute [rw] lib_version
1248
1318
  # The library version as recorded in instrumentation and logging
1249
- # @return [String]
1319
+ # @return [::String]
1250
1320
  # @!attribute [rw] channel_args
1251
1321
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1252
1322
  # `GRPC::Core::Channel` object is provided as the credential.
1253
- # @return [Hash]
1323
+ # @return [::Hash]
1254
1324
  # @!attribute [rw] interceptors
1255
1325
  # An array of interceptors that are run before calls are executed.
1256
- # @return [Array<GRPC::ClientInterceptor>]
1326
+ # @return [::Array<::GRPC::ClientInterceptor>]
1257
1327
  # @!attribute [rw] timeout
1258
- # The call timeout in milliseconds.
1259
- # @return [Numeric]
1328
+ # The call timeout in seconds.
1329
+ # @return [::Numeric]
1260
1330
  # @!attribute [rw] metadata
1261
1331
  # Additional gRPC headers to be sent with the call.
1262
- # @return [Hash{Symbol=>String}]
1332
+ # @return [::Hash{::Symbol=>::String}]
1263
1333
  # @!attribute [rw] retry_policy
1264
1334
  # The retry policy. The value is a hash with the following keys:
1265
1335
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -1267,25 +1337,29 @@ module Google
1267
1337
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1268
1338
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1269
1339
  # trigger a retry.
1270
- # @return [Hash]
1340
+ # @return [::Hash]
1341
+ # @!attribute [rw] quota_project
1342
+ # A separate project against which to charge quota.
1343
+ # @return [::String]
1271
1344
  #
1272
1345
  class Configuration
1273
- extend Gapic::Config
1346
+ extend ::Gapic::Config
1274
1347
 
1275
- config_attr :endpoint, "secretmanager.googleapis.com", String
1276
- config_attr :credentials, nil do |value|
1348
+ config_attr :endpoint, "secretmanager.googleapis.com", ::String
1349
+ config_attr :credentials, nil do |value|
1277
1350
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1278
1351
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1279
1352
  allowed.any? { |klass| klass === value }
1280
1353
  end
1281
- config_attr :scope, nil, String, Array, nil
1282
- config_attr :lib_name, nil, String, nil
1283
- config_attr :lib_version, nil, String, nil
1284
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
1285
- config_attr :interceptors, nil, Array, nil
1286
- config_attr :timeout, nil, Numeric, nil
1287
- config_attr :metadata, nil, Hash, nil
1288
- config_attr :retry_policy, nil, Hash, Proc, nil
1354
+ config_attr :scope, nil, ::String, ::Array, nil
1355
+ config_attr :lib_name, nil, ::String, nil
1356
+ config_attr :lib_version, nil, ::String, nil
1357
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
1358
+ config_attr :interceptors, nil, ::Array, nil
1359
+ config_attr :timeout, nil, ::Numeric, nil
1360
+ config_attr :metadata, nil, ::Hash, nil
1361
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1362
+ config_attr :quota_project, nil, ::String, nil
1289
1363
 
1290
1364
  # @private
1291
1365
  def initialize parent_config = nil
@@ -1301,7 +1375,7 @@ module Google
1301
1375
  def rpcs
1302
1376
  @rpcs ||= begin
1303
1377
  parent_rpcs = nil
1304
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
1378
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
1305
1379
  Rpcs.new parent_rpcs
1306
1380
  end
1307
1381
  end
@@ -1326,112 +1400,112 @@ module Google
1326
1400
  class Rpcs
1327
1401
  ##
1328
1402
  # RPC-specific configuration for `list_secrets`
1329
- # @return [Gapic::Config::Method]
1403
+ # @return [::Gapic::Config::Method]
1330
1404
  #
1331
1405
  attr_reader :list_secrets
1332
1406
  ##
1333
1407
  # RPC-specific configuration for `create_secret`
1334
- # @return [Gapic::Config::Method]
1408
+ # @return [::Gapic::Config::Method]
1335
1409
  #
1336
1410
  attr_reader :create_secret
1337
1411
  ##
1338
1412
  # RPC-specific configuration for `add_secret_version`
1339
- # @return [Gapic::Config::Method]
1413
+ # @return [::Gapic::Config::Method]
1340
1414
  #
1341
1415
  attr_reader :add_secret_version
1342
1416
  ##
1343
1417
  # RPC-specific configuration for `get_secret`
1344
- # @return [Gapic::Config::Method]
1418
+ # @return [::Gapic::Config::Method]
1345
1419
  #
1346
1420
  attr_reader :get_secret
1347
1421
  ##
1348
1422
  # RPC-specific configuration for `update_secret`
1349
- # @return [Gapic::Config::Method]
1423
+ # @return [::Gapic::Config::Method]
1350
1424
  #
1351
1425
  attr_reader :update_secret
1352
1426
  ##
1353
1427
  # RPC-specific configuration for `delete_secret`
1354
- # @return [Gapic::Config::Method]
1428
+ # @return [::Gapic::Config::Method]
1355
1429
  #
1356
1430
  attr_reader :delete_secret
1357
1431
  ##
1358
1432
  # RPC-specific configuration for `list_secret_versions`
1359
- # @return [Gapic::Config::Method]
1433
+ # @return [::Gapic::Config::Method]
1360
1434
  #
1361
1435
  attr_reader :list_secret_versions
1362
1436
  ##
1363
1437
  # RPC-specific configuration for `get_secret_version`
1364
- # @return [Gapic::Config::Method]
1438
+ # @return [::Gapic::Config::Method]
1365
1439
  #
1366
1440
  attr_reader :get_secret_version
1367
1441
  ##
1368
1442
  # RPC-specific configuration for `access_secret_version`
1369
- # @return [Gapic::Config::Method]
1443
+ # @return [::Gapic::Config::Method]
1370
1444
  #
1371
1445
  attr_reader :access_secret_version
1372
1446
  ##
1373
1447
  # RPC-specific configuration for `disable_secret_version`
1374
- # @return [Gapic::Config::Method]
1448
+ # @return [::Gapic::Config::Method]
1375
1449
  #
1376
1450
  attr_reader :disable_secret_version
1377
1451
  ##
1378
1452
  # RPC-specific configuration for `enable_secret_version`
1379
- # @return [Gapic::Config::Method]
1453
+ # @return [::Gapic::Config::Method]
1380
1454
  #
1381
1455
  attr_reader :enable_secret_version
1382
1456
  ##
1383
1457
  # RPC-specific configuration for `destroy_secret_version`
1384
- # @return [Gapic::Config::Method]
1458
+ # @return [::Gapic::Config::Method]
1385
1459
  #
1386
1460
  attr_reader :destroy_secret_version
1387
1461
  ##
1388
1462
  # RPC-specific configuration for `set_iam_policy`
1389
- # @return [Gapic::Config::Method]
1463
+ # @return [::Gapic::Config::Method]
1390
1464
  #
1391
1465
  attr_reader :set_iam_policy
1392
1466
  ##
1393
1467
  # RPC-specific configuration for `get_iam_policy`
1394
- # @return [Gapic::Config::Method]
1468
+ # @return [::Gapic::Config::Method]
1395
1469
  #
1396
1470
  attr_reader :get_iam_policy
1397
1471
  ##
1398
1472
  # RPC-specific configuration for `test_iam_permissions`
1399
- # @return [Gapic::Config::Method]
1473
+ # @return [::Gapic::Config::Method]
1400
1474
  #
1401
1475
  attr_reader :test_iam_permissions
1402
1476
 
1403
1477
  # @private
1404
1478
  def initialize parent_rpcs = nil
1405
1479
  list_secrets_config = parent_rpcs&.list_secrets if parent_rpcs&.respond_to? :list_secrets
1406
- @list_secrets = Gapic::Config::Method.new list_secrets_config
1480
+ @list_secrets = ::Gapic::Config::Method.new list_secrets_config
1407
1481
  create_secret_config = parent_rpcs&.create_secret if parent_rpcs&.respond_to? :create_secret
1408
- @create_secret = Gapic::Config::Method.new create_secret_config
1482
+ @create_secret = ::Gapic::Config::Method.new create_secret_config
1409
1483
  add_secret_version_config = parent_rpcs&.add_secret_version if parent_rpcs&.respond_to? :add_secret_version
1410
- @add_secret_version = Gapic::Config::Method.new add_secret_version_config
1484
+ @add_secret_version = ::Gapic::Config::Method.new add_secret_version_config
1411
1485
  get_secret_config = parent_rpcs&.get_secret if parent_rpcs&.respond_to? :get_secret
1412
- @get_secret = Gapic::Config::Method.new get_secret_config
1486
+ @get_secret = ::Gapic::Config::Method.new get_secret_config
1413
1487
  update_secret_config = parent_rpcs&.update_secret if parent_rpcs&.respond_to? :update_secret
1414
- @update_secret = Gapic::Config::Method.new update_secret_config
1488
+ @update_secret = ::Gapic::Config::Method.new update_secret_config
1415
1489
  delete_secret_config = parent_rpcs&.delete_secret if parent_rpcs&.respond_to? :delete_secret
1416
- @delete_secret = Gapic::Config::Method.new delete_secret_config
1490
+ @delete_secret = ::Gapic::Config::Method.new delete_secret_config
1417
1491
  list_secret_versions_config = parent_rpcs&.list_secret_versions if parent_rpcs&.respond_to? :list_secret_versions
1418
- @list_secret_versions = Gapic::Config::Method.new list_secret_versions_config
1492
+ @list_secret_versions = ::Gapic::Config::Method.new list_secret_versions_config
1419
1493
  get_secret_version_config = parent_rpcs&.get_secret_version if parent_rpcs&.respond_to? :get_secret_version
1420
- @get_secret_version = Gapic::Config::Method.new get_secret_version_config
1494
+ @get_secret_version = ::Gapic::Config::Method.new get_secret_version_config
1421
1495
  access_secret_version_config = parent_rpcs&.access_secret_version if parent_rpcs&.respond_to? :access_secret_version
1422
- @access_secret_version = Gapic::Config::Method.new access_secret_version_config
1496
+ @access_secret_version = ::Gapic::Config::Method.new access_secret_version_config
1423
1497
  disable_secret_version_config = parent_rpcs&.disable_secret_version if parent_rpcs&.respond_to? :disable_secret_version
1424
- @disable_secret_version = Gapic::Config::Method.new disable_secret_version_config
1498
+ @disable_secret_version = ::Gapic::Config::Method.new disable_secret_version_config
1425
1499
  enable_secret_version_config = parent_rpcs&.enable_secret_version if parent_rpcs&.respond_to? :enable_secret_version
1426
- @enable_secret_version = Gapic::Config::Method.new enable_secret_version_config
1500
+ @enable_secret_version = ::Gapic::Config::Method.new enable_secret_version_config
1427
1501
  destroy_secret_version_config = parent_rpcs&.destroy_secret_version if parent_rpcs&.respond_to? :destroy_secret_version
1428
- @destroy_secret_version = Gapic::Config::Method.new destroy_secret_version_config
1502
+ @destroy_secret_version = ::Gapic::Config::Method.new destroy_secret_version_config
1429
1503
  set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy
1430
- @set_iam_policy = Gapic::Config::Method.new set_iam_policy_config
1504
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1431
1505
  get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy
1432
- @get_iam_policy = Gapic::Config::Method.new get_iam_policy_config
1506
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1433
1507
  test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
1434
- @test_iam_permissions = Gapic::Config::Method.new test_iam_permissions_config
1508
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1435
1509
 
1436
1510
  yield self if block_given?
1437
1511
  end
@@ -1443,13 +1517,3 @@ module Google
1443
1517
  end
1444
1518
  end
1445
1519
  end
1446
-
1447
- # rubocop:disable Lint/HandleExceptions
1448
-
1449
- # Once client is loaded, load helpers.rb if it exists.
1450
- begin
1451
- require "google/cloud/secret_manager/v1/secret_manager_service/helpers"
1452
- rescue LoadError
1453
- end
1454
-
1455
- # rubocop:enable Lint/HandleExceptions