google-cloud-secret_manager-v1beta1 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e279fc4f5eaf4d3fac171b9dd5a4aeb7f71b978bb339234ed0a473463a425746
4
- data.tar.gz: 7a12addd437e83c4105ab318359248fe8e8d2a2321cc217e182e14d51f5cbaa5
3
+ metadata.gz: 217146c9e3a1e20f43eff3784d5b87bb16559743ed0c7d2f57aa734e5e3eebb4
4
+ data.tar.gz: cf8e88704cc1a08cc97456a177db4698000d2b3355390710acf279db9a85e261
5
5
  SHA512:
6
- metadata.gz: 632a144908b5fb8ae785c547f55c042d33e4013407ffb35d3146904a3e1e0e3c5096dde6d1010a47dddf7bdce9985f363cf0984d606f456b2ec15be7f7dc9de5
7
- data.tar.gz: 685f96628760baba81e6be82d645530102d4e7a8cdc2e5714dbd1e8253771949c3ba173c583548fb00f441847398466f390358179db3514d7b62a3b12d449cb6
6
+ metadata.gz: 0cec41d1c59723385e113d295ac379015c215add1ed528d3f79eeb7c52c037adf10cc764915f0e116ec13da8aa231576d045e3adb3be8ac56be40aac1b38c2cc
7
+ data.tar.gz: f2c86d3d592bab913504c5cda80cb32193a46e08b2250c7b39472bfb7c97dd2ef93630c2f5eb99b03dd77500b24c3dfcc1176efb5a9b621f1a326cf66bfd1c5d
data/AUTHENTICATION.md CHANGED
@@ -1,16 +1,17 @@
1
1
  # Authentication
2
2
 
3
- In general, the google-cloud-secret_manager-v1beta1 library uses [Service
4
- Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
5
- credentials to connect to Google Cloud services. When running within [Google
6
- Cloud Platform environments](#google-cloud-platform-environments)
7
- the credentials will be discovered automatically. When running on other
3
+ In general, the google-cloud-secret_manager-v1beta1 library uses
4
+ [Service Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
5
+ credentials to connect to Google Cloud services. When running within
6
+ [Google Cloud Platform environments](#google-cloud-platform-environments) the
7
+ credentials will be discovered automatically. When running on other
8
8
  environments, the Service Account credentials can be specified by providing the
9
- path to the [JSON
10
- keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys) for
11
- the account (or the JSON itself) in [environment
12
- variables](#environment-variables). Additionally, Cloud SDK credentials can also
13
- be discovered automatically, but this is only recommended during development.
9
+ path to the
10
+ [JSON keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys)
11
+ for the account (or the JSON itself) in
12
+ [environment variables](#environment-variables). Additionally, Cloud SDK
13
+ credentials can also be discovered automatically, but this is only recommended
14
+ during development.
14
15
 
15
16
  ## Quickstart
16
17
 
@@ -46,23 +47,24 @@ without **Service Account Credentials** directly in code.
46
47
 
47
48
  ### Google Cloud Platform environments
48
49
 
49
- When running on Google Cloud Platform (GCP), including Google Compute Engine (GCE),
50
- Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud Functions
51
- (GCF) and Cloud Run, **Credentials** and are discovered
52
- automatically. Code should be written as if already authenticated.
50
+ When running on Google Cloud Platform (GCP), including Google Compute Engine
51
+ (GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud
52
+ Functions (GCF) and Cloud Run, **Credentials** are discovered automatically.
53
+ Code should be written as if already authenticated.
53
54
 
54
55
  ### Environment Variables
55
56
 
56
- The **Credentials JSON** can be placed in environment
57
- variables instead of declaring them directly in code. Each service has its own
58
- environment variable, allowing for different service accounts to be used for
59
- different services. (See the READMEs for the individual service gems for
60
- details.) The path to the **Credentials JSON** file can be stored in the
61
- environment variable, or the **Credentials JSON** itself can be stored for
62
- environments such as Docker containers where writing files is difficult or not
63
- encouraged.
57
+ The **Credentials JSON** can be placed in environment variables instead of
58
+ declaring them directly in code. Each service has its own environment variable,
59
+ allowing for different service accounts to be used for different services. (See
60
+ the READMEs for the individual service gems for details.) The path to the
61
+ **Credentials JSON** file can be stored in the environment variable, or the
62
+ **Credentials JSON** itself can be stored for environments such as Docker
63
+ containers where writing files is difficult or not encouraged.
64
64
 
65
- The environment variables that google-cloud-secret_manager-v1beta1 checks for credentials are configured on the service Credentials class (such as {Google::Cloud::SecretManager::V1beta1::SecretManagerService::Credentials}):
65
+ The environment variables that google-cloud-secret_manager-v1beta1
66
+ checks for credentials are configured on the service Credentials class (such as
67
+ {Google::Cloud::SecretManager::V1beta1::SecretManagerService::Credentials}):
66
68
 
67
69
  1. `SECRET_MANAGER_CREDENTIALS` - Path to JSON file, or JSON contents
68
70
  2. `SECRET_MANAGER_KEYFILE` - Path to JSON file, or JSON contents
@@ -80,7 +82,8 @@ client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new
80
82
 
81
83
  ### Configuration
82
84
 
83
- The **Credentials JSON** can be configured instead of placing them in environment variables. Either on an individual client initialization:
85
+ The **Credentials JSON** can be configured instead of placing them in
86
+ environment variables. Either on an individual client initialization:
84
87
 
85
88
  ```ruby
86
89
  require "google/cloud/secret_manager/v1beta1"
@@ -137,15 +140,15 @@ environments](#google-cloud-platform-environments), you need a Google
137
140
  Developers service account.
138
141
 
139
142
  1. Visit the [Google Developers Console][dev-console].
140
- 1. Create a new project or click on an existing project.
141
- 1. Activate the slide-out navigation tray and select **API Manager**. From
143
+ 2. Create a new project or click on an existing project.
144
+ 3. Activate the slide-out navigation tray and select **API Manager**. From
142
145
  here, you will enable the APIs that your application requires.
143
146
 
144
147
  ![Enable the APIs that your application requires][enable-apis]
145
148
 
146
149
  *Note: You may need to enable billing in order to use these services.*
147
150
 
148
- 1. Select **Credentials** from the side navigation.
151
+ 4. Select **Credentials** from the side navigation.
149
152
 
150
153
  You should see a screen like one of the following.
151
154
 
@@ -67,7 +67,45 @@ module Google
67
67
  break parent_const.configure if parent_const&.respond_to? :configure
68
68
  namespace.pop
69
69
  end
70
- Client::Configuration.new parent_config
70
+ default_config = Client::Configuration.new parent_config
71
+
72
+ default_config.rpcs.list_secrets.timeout = 60.0
73
+
74
+ default_config.rpcs.create_secret.timeout = 60.0
75
+
76
+ default_config.rpcs.add_secret_version.timeout = 60.0
77
+
78
+ default_config.rpcs.get_secret.timeout = 60.0
79
+
80
+ default_config.rpcs.update_secret.timeout = 60.0
81
+
82
+ default_config.rpcs.delete_secret.timeout = 60.0
83
+
84
+ default_config.rpcs.list_secret_versions.timeout = 60.0
85
+
86
+ default_config.rpcs.get_secret_version.timeout = 60.0
87
+
88
+ default_config.rpcs.access_secret_version.timeout = 60.0
89
+ default_config.rpcs.access_secret_version.retry_policy = {
90
+ initial_delay: 1.0,
91
+ max_delay: 60.0,
92
+ multiplier: 1.3,
93
+ retry_codes: ["UNAVAILABLE", "UNKNOWN"]
94
+ }
95
+
96
+ default_config.rpcs.disable_secret_version.timeout = 60.0
97
+
98
+ default_config.rpcs.enable_secret_version.timeout = 60.0
99
+
100
+ default_config.rpcs.destroy_secret_version.timeout = 60.0
101
+
102
+ default_config.rpcs.set_iam_policy.timeout = 60.0
103
+
104
+ default_config.rpcs.get_iam_policy.timeout = 60.0
105
+
106
+ default_config.rpcs.test_iam_permissions.timeout = 60.0
107
+
108
+ default_config
71
109
  end
72
110
  yield @configure if block_given?
73
111
  @configure
@@ -132,7 +170,7 @@ module Google
132
170
  if credentials.is_a?(String) || credentials.is_a?(Hash)
133
171
  credentials = Credentials.new credentials, scope: @config.scope
134
172
  end
135
-
173
+ @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
136
174
 
137
175
  @secret_manager_service_stub = Gapic::ServiceStub.new(
138
176
  Google::Cloud::SecretManager::V1beta1::SecretManagerService::Stub,
@@ -146,25 +184,25 @@ module Google
146
184
  # Service calls
147
185
 
148
186
  ##
149
- # Lists [Secrets][google.cloud.secrets.v1beta1.Secret].
187
+ # Lists {Google::Cloud::SecretManager::V1beta1::Secret Secrets}.
150
188
  #
151
189
  # @overload list_secrets(request, options = nil)
152
190
  # @param request [Google::Cloud::SecretManager::V1beta1::ListSecretsRequest | Hash]
153
- # Lists [Secrets][google.cloud.secrets.v1beta1.Secret].
191
+ # Lists {Google::Cloud::SecretManager::V1beta1::Secret Secrets}.
154
192
  # @param options [Gapic::CallOptions, Hash]
155
193
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
156
194
  #
157
195
  # @overload list_secrets(parent: nil, page_size: nil, page_token: nil)
158
196
  # @param parent [String]
159
197
  # Required. The resource name of the project associated with the
160
- # [Secrets][google.cloud.secrets.v1beta1.Secret], in the format `projects/*`.
198
+ # {Google::Cloud::SecretManager::V1beta1::Secret Secrets}, in the format `projects/*`.
161
199
  # @param page_size [Integer]
162
200
  # Optional. The maximum number of results to be returned in a single page. If
163
201
  # set to 0, the server decides the number of results to return. If the
164
202
  # number is greater than 25000, it is capped at 25000.
165
203
  # @param page_token [String]
166
204
  # Optional. Pagination token, returned earlier via
167
- # [ListSecretsResponse.next_page_token][google.cloud.secrets.v1beta1.ListSecretsResponse.next_page_token].
205
+ # {Google::Cloud::SecretManager::V1beta1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}.
168
206
  #
169
207
  #
170
208
  # @yield [response, operation] Access the result along with the RPC operation
@@ -181,15 +219,16 @@ module Google
181
219
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::ListSecretsRequest
182
220
 
183
221
  # Converts hash and nil to an options object
184
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
222
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
185
223
 
186
224
  # Customize the options with defaults
187
225
  metadata = @config.rpcs.list_secrets.metadata.to_h
188
226
 
189
- # Set x-goog-api-client header
227
+ # Set x-goog-api-client and x-goog-user-project headers
190
228
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
191
229
  lib_name: @config.lib_name, lib_version: @config.lib_version,
192
230
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
231
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
193
232
 
194
233
  header_params = {
195
234
  "parent" => request.parent
@@ -213,22 +252,22 @@ module Google
213
252
  end
214
253
 
215
254
  ##
216
- # Creates a new [Secret][google.cloud.secrets.v1beta1.Secret] containing no [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion].
255
+ # Creates a new {Google::Cloud::SecretManager::V1beta1::Secret Secret} containing no {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}.
217
256
  #
218
257
  # @overload create_secret(request, options = nil)
219
258
  # @param request [Google::Cloud::SecretManager::V1beta1::CreateSecretRequest | Hash]
220
- # Creates a new [Secret][google.cloud.secrets.v1beta1.Secret] containing no [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion].
259
+ # Creates a new {Google::Cloud::SecretManager::V1beta1::Secret Secret} containing no {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}.
221
260
  # @param options [Gapic::CallOptions, Hash]
222
261
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
223
262
  #
224
263
  # @overload create_secret(parent: nil, secret_id: nil, secret: nil)
225
264
  # @param parent [String]
226
265
  # Required. The resource name of the project to associate with the
227
- # [Secret][google.cloud.secrets.v1beta1.Secret], in the format `projects/*`.
266
+ # {Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format `projects/*`.
228
267
  # @param secret_id [String]
229
268
  # Required. This must be unique within the project.
230
269
  # @param secret [Google::Cloud::SecretManager::V1beta1::Secret | Hash]
231
- # A [Secret][google.cloud.secrets.v1beta1.Secret] with initial field values.
270
+ # A {Google::Cloud::SecretManager::V1beta1::Secret Secret} with initial field values.
232
271
  #
233
272
  #
234
273
  # @yield [response, operation] Access the result along with the RPC operation
@@ -245,15 +284,16 @@ module Google
245
284
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::CreateSecretRequest
246
285
 
247
286
  # Converts hash and nil to an options object
248
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
287
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
249
288
 
250
289
  # Customize the options with defaults
251
290
  metadata = @config.rpcs.create_secret.metadata.to_h
252
291
 
253
- # Set x-goog-api-client header
292
+ # Set x-goog-api-client and x-goog-user-project headers
254
293
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
255
294
  lib_name: @config.lib_name, lib_version: @config.lib_version,
256
295
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
296
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
257
297
 
258
298
  header_params = {
259
299
  "parent" => request.parent
@@ -276,22 +316,22 @@ module Google
276
316
  end
277
317
 
278
318
  ##
279
- # Creates a new [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] containing secret data and attaches
280
- # it to an existing [Secret][google.cloud.secrets.v1beta1.Secret].
319
+ # Creates a new {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} containing secret data and attaches
320
+ # it to an existing {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
281
321
  #
282
322
  # @overload add_secret_version(request, options = nil)
283
323
  # @param request [Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest | Hash]
284
- # Creates a new [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] containing secret data and attaches
285
- # it to an existing [Secret][google.cloud.secrets.v1beta1.Secret].
324
+ # Creates a new {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} containing secret data and attaches
325
+ # it to an existing {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
286
326
  # @param options [Gapic::CallOptions, Hash]
287
327
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
288
328
  #
289
329
  # @overload add_secret_version(parent: nil, payload: nil)
290
330
  # @param parent [String]
291
- # Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] to associate with the
292
- # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format `projects/*/secrets/*`.
331
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::Secret Secret} to associate with the
332
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format `projects/*/secrets/*`.
293
333
  # @param payload [Google::Cloud::SecretManager::V1beta1::SecretPayload | Hash]
294
- # Required. The secret payload of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
334
+ # Required. The secret payload of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
295
335
  #
296
336
  #
297
337
  # @yield [response, operation] Access the result along with the RPC operation
@@ -308,15 +348,16 @@ module Google
308
348
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest
309
349
 
310
350
  # Converts hash and nil to an options object
311
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
351
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
312
352
 
313
353
  # Customize the options with defaults
314
354
  metadata = @config.rpcs.add_secret_version.metadata.to_h
315
355
 
316
- # Set x-goog-api-client header
356
+ # Set x-goog-api-client and x-goog-user-project headers
317
357
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
318
358
  lib_name: @config.lib_name, lib_version: @config.lib_version,
319
359
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
360
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
320
361
 
321
362
  header_params = {
322
363
  "parent" => request.parent
@@ -339,17 +380,17 @@ module Google
339
380
  end
340
381
 
341
382
  ##
342
- # Gets metadata for a given [Secret][google.cloud.secrets.v1beta1.Secret].
383
+ # Gets metadata for a given {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
343
384
  #
344
385
  # @overload get_secret(request, options = nil)
345
386
  # @param request [Google::Cloud::SecretManager::V1beta1::GetSecretRequest | Hash]
346
- # Gets metadata for a given [Secret][google.cloud.secrets.v1beta1.Secret].
387
+ # Gets metadata for a given {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
347
388
  # @param options [Gapic::CallOptions, Hash]
348
389
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
349
390
  #
350
391
  # @overload get_secret(name: nil)
351
392
  # @param name [String]
352
- # Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret], in the format `projects/*/secrets/*`.
393
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format `projects/*/secrets/*`.
353
394
  #
354
395
  #
355
396
  # @yield [response, operation] Access the result along with the RPC operation
@@ -366,15 +407,16 @@ module Google
366
407
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::GetSecretRequest
367
408
 
368
409
  # Converts hash and nil to an options object
369
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
410
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
370
411
 
371
412
  # Customize the options with defaults
372
413
  metadata = @config.rpcs.get_secret.metadata.to_h
373
414
 
374
- # Set x-goog-api-client header
415
+ # Set x-goog-api-client and x-goog-user-project headers
375
416
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
376
417
  lib_name: @config.lib_name, lib_version: @config.lib_version,
377
418
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
419
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
378
420
 
379
421
  header_params = {
380
422
  "name" => request.name
@@ -397,17 +439,17 @@ module Google
397
439
  end
398
440
 
399
441
  ##
400
- # Updates metadata of an existing [Secret][google.cloud.secrets.v1beta1.Secret].
442
+ # Updates metadata of an existing {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
401
443
  #
402
444
  # @overload update_secret(request, options = nil)
403
445
  # @param request [Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest | Hash]
404
- # Updates metadata of an existing [Secret][google.cloud.secrets.v1beta1.Secret].
446
+ # Updates metadata of an existing {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
405
447
  # @param options [Gapic::CallOptions, Hash]
406
448
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
407
449
  #
408
450
  # @overload update_secret(secret: nil, update_mask: nil)
409
451
  # @param secret [Google::Cloud::SecretManager::V1beta1::Secret | Hash]
410
- # Required. [Secret][google.cloud.secrets.v1beta1.Secret] with updated field values.
452
+ # Required. {Google::Cloud::SecretManager::V1beta1::Secret Secret} with updated field values.
411
453
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
412
454
  # Required. Specifies the fields to be updated.
413
455
  #
@@ -426,15 +468,16 @@ module Google
426
468
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest
427
469
 
428
470
  # Converts hash and nil to an options object
429
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
471
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
430
472
 
431
473
  # Customize the options with defaults
432
474
  metadata = @config.rpcs.update_secret.metadata.to_h
433
475
 
434
- # Set x-goog-api-client header
476
+ # Set x-goog-api-client and x-goog-user-project headers
435
477
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
436
478
  lib_name: @config.lib_name, lib_version: @config.lib_version,
437
479
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
480
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
438
481
 
439
482
  header_params = {
440
483
  "secret.name" => request.secret.name
@@ -457,17 +500,17 @@ module Google
457
500
  end
458
501
 
459
502
  ##
460
- # Deletes a [Secret][google.cloud.secrets.v1beta1.Secret].
503
+ # Deletes a {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
461
504
  #
462
505
  # @overload delete_secret(request, options = nil)
463
506
  # @param request [Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest | Hash]
464
- # Deletes a [Secret][google.cloud.secrets.v1beta1.Secret].
507
+ # Deletes a {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
465
508
  # @param options [Gapic::CallOptions, Hash]
466
509
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
467
510
  #
468
511
  # @overload delete_secret(name: nil)
469
512
  # @param name [String]
470
- # Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] to delete in the format
513
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::Secret Secret} to delete in the format
471
514
  # `projects/*/secrets/*`.
472
515
  #
473
516
  #
@@ -485,15 +528,16 @@ module Google
485
528
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest
486
529
 
487
530
  # Converts hash and nil to an options object
488
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
531
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
489
532
 
490
533
  # Customize the options with defaults
491
534
  metadata = @config.rpcs.delete_secret.metadata.to_h
492
535
 
493
- # Set x-goog-api-client header
536
+ # Set x-goog-api-client and x-goog-user-project headers
494
537
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
495
538
  lib_name: @config.lib_name, lib_version: @config.lib_version,
496
539
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
540
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
497
541
 
498
542
  header_params = {
499
543
  "name" => request.name
@@ -516,20 +560,20 @@ module Google
516
560
  end
517
561
 
518
562
  ##
519
- # Lists [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion]. This call does not return secret
563
+ # Lists {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. This call does not return secret
520
564
  # data.
521
565
  #
522
566
  # @overload list_secret_versions(request, options = nil)
523
567
  # @param request [Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest | Hash]
524
- # Lists [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion]. This call does not return secret
568
+ # Lists {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. This call does not return secret
525
569
  # data.
526
570
  # @param options [Gapic::CallOptions, Hash]
527
571
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
528
572
  #
529
573
  # @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil)
530
574
  # @param parent [String]
531
- # Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] associated with the
532
- # [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] to list, in the format
575
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::Secret Secret} associated with the
576
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} to list, in the format
533
577
  # `projects/*/secrets/*`.
534
578
  # @param page_size [Integer]
535
579
  # Optional. The maximum number of results to be returned in a single page. If
@@ -554,15 +598,16 @@ module Google
554
598
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest
555
599
 
556
600
  # Converts hash and nil to an options object
557
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
601
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
558
602
 
559
603
  # Customize the options with defaults
560
604
  metadata = @config.rpcs.list_secret_versions.metadata.to_h
561
605
 
562
- # Set x-goog-api-client header
606
+ # Set x-goog-api-client and x-goog-user-project headers
563
607
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
564
608
  lib_name: @config.lib_name, lib_version: @config.lib_version,
565
609
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
610
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
566
611
 
567
612
  header_params = {
568
613
  "parent" => request.parent
@@ -586,26 +631,26 @@ module Google
586
631
  end
587
632
 
588
633
  ##
589
- # Gets metadata for a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
634
+ # Gets metadata for a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
590
635
  #
591
636
  # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
592
- # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
637
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
593
638
  #
594
639
  # @overload get_secret_version(request, options = nil)
595
640
  # @param request [Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest | Hash]
596
- # Gets metadata for a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
641
+ # Gets metadata for a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
597
642
  #
598
643
  # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
599
- # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
644
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
600
645
  # @param options [Gapic::CallOptions, Hash]
601
646
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
602
647
  #
603
648
  # @overload get_secret_version(name: nil)
604
649
  # @param name [String]
605
- # Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format
650
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format
606
651
  # `projects/*/secrets/*/versions/*`.
607
652
  # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
608
- # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
653
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
609
654
  #
610
655
  #
611
656
  # @yield [response, operation] Access the result along with the RPC operation
@@ -622,15 +667,16 @@ module Google
622
667
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest
623
668
 
624
669
  # Converts hash and nil to an options object
625
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
670
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
626
671
 
627
672
  # Customize the options with defaults
628
673
  metadata = @config.rpcs.get_secret_version.metadata.to_h
629
674
 
630
- # Set x-goog-api-client header
675
+ # Set x-goog-api-client and x-goog-user-project headers
631
676
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
632
677
  lib_name: @config.lib_name, lib_version: @config.lib_version,
633
678
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
679
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
634
680
 
635
681
  header_params = {
636
682
  "name" => request.name
@@ -653,23 +699,23 @@ module Google
653
699
  end
654
700
 
655
701
  ##
656
- # Accesses a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. This call returns the secret data.
702
+ # Accesses a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. This call returns the secret data.
657
703
  #
658
704
  # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
659
- # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
705
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
660
706
  #
661
707
  # @overload access_secret_version(request, options = nil)
662
708
  # @param request [Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest | Hash]
663
- # Accesses a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. This call returns the secret data.
709
+ # Accesses a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. This call returns the secret data.
664
710
  #
665
711
  # `projects/*/secrets/*/versions/latest` is an alias to the `latest`
666
- # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
712
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
667
713
  # @param options [Gapic::CallOptions, Hash]
668
714
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
669
715
  #
670
716
  # @overload access_secret_version(name: nil)
671
717
  # @param name [String]
672
- # Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format
718
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format
673
719
  # `projects/*/secrets/*/versions/*`.
674
720
  #
675
721
  #
@@ -687,15 +733,16 @@ module Google
687
733
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest
688
734
 
689
735
  # Converts hash and nil to an options object
690
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
736
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
691
737
 
692
738
  # Customize the options with defaults
693
739
  metadata = @config.rpcs.access_secret_version.metadata.to_h
694
740
 
695
- # Set x-goog-api-client header
741
+ # Set x-goog-api-client and x-goog-user-project headers
696
742
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
697
743
  lib_name: @config.lib_name, lib_version: @config.lib_version,
698
744
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
745
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
699
746
 
700
747
  header_params = {
701
748
  "name" => request.name
@@ -718,23 +765,23 @@ module Google
718
765
  end
719
766
 
720
767
  ##
721
- # Disables a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
768
+ # Disables a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
722
769
  #
723
- # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to
724
- # [DISABLED][google.cloud.secrets.v1beta1.SecretVersion.State.DISABLED].
770
+ # Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
771
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DISABLED DISABLED}.
725
772
  #
726
773
  # @overload disable_secret_version(request, options = nil)
727
774
  # @param request [Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest | Hash]
728
- # Disables a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
775
+ # Disables a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
729
776
  #
730
- # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to
731
- # [DISABLED][google.cloud.secrets.v1beta1.SecretVersion.State.DISABLED].
777
+ # Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
778
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DISABLED DISABLED}.
732
779
  # @param options [Gapic::CallOptions, Hash]
733
780
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
734
781
  #
735
782
  # @overload disable_secret_version(name: nil)
736
783
  # @param name [String]
737
- # Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to disable in the format
784
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to disable in the format
738
785
  # `projects/*/secrets/*/versions/*`.
739
786
  #
740
787
  #
@@ -752,15 +799,16 @@ module Google
752
799
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest
753
800
 
754
801
  # Converts hash and nil to an options object
755
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
802
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
756
803
 
757
804
  # Customize the options with defaults
758
805
  metadata = @config.rpcs.disable_secret_version.metadata.to_h
759
806
 
760
- # Set x-goog-api-client header
807
+ # Set x-goog-api-client and x-goog-user-project headers
761
808
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
762
809
  lib_name: @config.lib_name, lib_version: @config.lib_version,
763
810
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
811
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
764
812
 
765
813
  header_params = {
766
814
  "name" => request.name
@@ -783,23 +831,23 @@ module Google
783
831
  end
784
832
 
785
833
  ##
786
- # Enables a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
834
+ # Enables a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
787
835
  #
788
- # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to
789
- # [ENABLED][google.cloud.secrets.v1beta1.SecretVersion.State.ENABLED].
836
+ # Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
837
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::ENABLED ENABLED}.
790
838
  #
791
839
  # @overload enable_secret_version(request, options = nil)
792
840
  # @param request [Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest | Hash]
793
- # Enables a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
841
+ # Enables a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
794
842
  #
795
- # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to
796
- # [ENABLED][google.cloud.secrets.v1beta1.SecretVersion.State.ENABLED].
843
+ # Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
844
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::ENABLED ENABLED}.
797
845
  # @param options [Gapic::CallOptions, Hash]
798
846
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
799
847
  #
800
848
  # @overload enable_secret_version(name: nil)
801
849
  # @param name [String]
802
- # Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to enable in the format
850
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to enable in the format
803
851
  # `projects/*/secrets/*/versions/*`.
804
852
  #
805
853
  #
@@ -817,15 +865,16 @@ module Google
817
865
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest
818
866
 
819
867
  # Converts hash and nil to an options object
820
- 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
821
869
 
822
870
  # Customize the options with defaults
823
871
  metadata = @config.rpcs.enable_secret_version.metadata.to_h
824
872
 
825
- # Set x-goog-api-client header
873
+ # Set x-goog-api-client and x-goog-user-project headers
826
874
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
827
875
  lib_name: @config.lib_name, lib_version: @config.lib_version,
828
876
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
877
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
829
878
 
830
879
  header_params = {
831
880
  "name" => request.name
@@ -848,25 +897,25 @@ module Google
848
897
  end
849
898
 
850
899
  ##
851
- # Destroys a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
900
+ # Destroys a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
852
901
  #
853
- # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to
854
- # [DESTROYED][google.cloud.secrets.v1beta1.SecretVersion.State.DESTROYED] and irrevocably destroys the
902
+ # Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
903
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED} and irrevocably destroys the
855
904
  # secret data.
856
905
  #
857
906
  # @overload destroy_secret_version(request, options = nil)
858
907
  # @param request [Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest | Hash]
859
- # Destroys a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
908
+ # Destroys a {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}.
860
909
  #
861
- # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to
862
- # [DESTROYED][google.cloud.secrets.v1beta1.SecretVersion.State.DESTROYED] and irrevocably destroys the
910
+ # Sets the {Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to
911
+ # {Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED} and irrevocably destroys the
863
912
  # secret data.
864
913
  # @param options [Gapic::CallOptions, Hash]
865
914
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
866
915
  #
867
916
  # @overload destroy_secret_version(name: nil)
868
917
  # @param name [String]
869
- # Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to destroy in the format
918
+ # Required. The resource name of the {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to destroy in the format
870
919
  # `projects/*/secrets/*/versions/*`.
871
920
  #
872
921
  #
@@ -884,15 +933,16 @@ module Google
884
933
  request = Gapic::Protobuf.coerce request, to: Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest
885
934
 
886
935
  # Converts hash and nil to an options object
887
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
936
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
888
937
 
889
938
  # Customize the options with defaults
890
939
  metadata = @config.rpcs.destroy_secret_version.metadata.to_h
891
940
 
892
- # Set x-goog-api-client header
941
+ # Set x-goog-api-client and x-goog-user-project headers
893
942
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
894
943
  lib_name: @config.lib_name, lib_version: @config.lib_version,
895
944
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
945
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
896
946
 
897
947
  header_params = {
898
948
  "name" => request.name
@@ -918,16 +968,16 @@ module Google
918
968
  # Sets the access control policy on the specified secret. Replaces any
919
969
  # existing policy.
920
970
  #
921
- # Permissions on [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] are enforced according
922
- # to the policy set on the associated [Secret][google.cloud.secrets.v1beta1.Secret].
971
+ # Permissions on {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} are enforced according
972
+ # to the policy set on the associated {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
923
973
  #
924
974
  # @overload set_iam_policy(request, options = nil)
925
975
  # @param request [Google::Iam::V1::SetIamPolicyRequest | Hash]
926
976
  # Sets the access control policy on the specified secret. Replaces any
927
977
  # existing policy.
928
978
  #
929
- # Permissions on [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] are enforced according
930
- # to the policy set on the associated [Secret][google.cloud.secrets.v1beta1.Secret].
979
+ # Permissions on {Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} are enforced according
980
+ # to the policy set on the associated {Google::Cloud::SecretManager::V1beta1::Secret Secret}.
931
981
  # @param options [Gapic::CallOptions, Hash]
932
982
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
933
983
  #
@@ -935,7 +985,7 @@ module Google
935
985
  # @param resource [String]
936
986
  # REQUIRED: The resource for which the policy is being specified.
937
987
  # `resource` is usually specified as a path. For example, a Project
938
- # resource is specified as `projects/\\\{project\}`.
988
+ # resource is specified as `projects/{project}`.
939
989
  # @param policy [Google::Iam::V1::Policy | Hash]
940
990
  # REQUIRED: The complete policy to be applied to the `resource`. The size of
941
991
  # the policy is limited to a few 10s of KB. An empty policy is a
@@ -957,15 +1007,16 @@ module Google
957
1007
  request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::SetIamPolicyRequest
958
1008
 
959
1009
  # Converts hash and nil to an options object
960
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
1010
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
961
1011
 
962
1012
  # Customize the options with defaults
963
1013
  metadata = @config.rpcs.set_iam_policy.metadata.to_h
964
1014
 
965
- # Set x-goog-api-client header
1015
+ # Set x-goog-api-client and x-goog-user-project headers
966
1016
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
967
1017
  lib_name: @config.lib_name, lib_version: @config.lib_version,
968
1018
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
1019
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
969
1020
 
970
1021
  header_params = {
971
1022
  "resource" => request.resource
@@ -1002,7 +1053,7 @@ module Google
1002
1053
  # @param resource [String]
1003
1054
  # REQUIRED: The resource for which the policy is being requested.
1004
1055
  # `resource` is usually specified as a path. For example, a Project
1005
- # resource is specified as `projects/\\\{project\}`.
1056
+ # resource is specified as `projects/{project}`.
1006
1057
  #
1007
1058
  #
1008
1059
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1019,15 +1070,16 @@ module Google
1019
1070
  request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::GetIamPolicyRequest
1020
1071
 
1021
1072
  # Converts hash and nil to an options object
1022
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
1073
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1023
1074
 
1024
1075
  # Customize the options with defaults
1025
1076
  metadata = @config.rpcs.get_iam_policy.metadata.to_h
1026
1077
 
1027
- # Set x-goog-api-client header
1078
+ # Set x-goog-api-client and x-goog-user-project headers
1028
1079
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1029
1080
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1030
1081
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
1082
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1031
1083
 
1032
1084
  header_params = {
1033
1085
  "resource" => request.resource
@@ -1074,7 +1126,7 @@ module Google
1074
1126
  # @param resource [String]
1075
1127
  # REQUIRED: The resource for which the policy detail is being requested.
1076
1128
  # `resource` is usually specified as a path. For example, a Project
1077
- # resource is specified as `projects/\\\{project\}`.
1129
+ # resource is specified as `projects/{project}`.
1078
1130
  # @param permissions [Array<String>]
1079
1131
  # The set of permissions to check for the `resource`. Permissions with
1080
1132
  # wildcards (such as '*' or 'storage.*') are not allowed. For more
@@ -1096,15 +1148,16 @@ module Google
1096
1148
  request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::TestIamPermissionsRequest
1097
1149
 
1098
1150
  # Converts hash and nil to an options object
1099
- options = Gapic::CallOptions.new options.to_h if options.respond_to? :to_h
1151
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1100
1152
 
1101
1153
  # Customize the options with defaults
1102
1154
  metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1103
1155
 
1104
- # Set x-goog-api-client header
1156
+ # Set x-goog-api-client and x-goog-user-project headers
1105
1157
  metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1106
1158
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1107
1159
  gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION
1160
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1108
1161
 
1109
1162
  header_params = {
1110
1163
  "resource" => request.resource