google-cloud-kms-v1 0.6.2 → 0.7.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: 8337db5ba4162c5b7a82151fe6598664b11752267653310199899e47a1d1e00f
4
- data.tar.gz: 88534bdd71fc167ad10a9213fe6853baf19fd1c43e117db1ae721a0e5420486a
3
+ metadata.gz: e7845135f0cf3cc40097a3152db01361dd968b6b1a6ac5e06a99ebce4f684315
4
+ data.tar.gz: d740419d2d65dbdc4cdc48dc32aa06ea91eb11ebb0bc6bdfe17d8d7896474fb8
5
5
  SHA512:
6
- metadata.gz: a4b436601ec0223032f30f8ac9a7cf422025f86dabd020a0cedf86833a962fd771bcd0947df084309c24a1c92372ebcaa12a9ceccbe17414b73dd7426485de06
7
- data.tar.gz: 3c739dbb844d631132f7baf7e44ee08e7436f8f14bf88c9f863a8e5b02289565cd98c6afc63b43aa8c523fb0eb6ac214f8cb7415bd1331ba75fd3e218de5ee9e
6
+ metadata.gz: 673cfaf87298951002dc3a2db9a6880b1318f427538b8b621f5e386d18b5c71eb79e7736edb227c9102342852199c6ef91ef872b8dd4aaf80c5927c3e87f3af4
7
+ data.tar.gz: 06be810e1fd03110fb34b18496ddf8229c591de93f1da7cc5d41bcf21af0d1c5f32ec8785596d2bd5b9f2f1b5f40fe13bd5e92c02c272e97b0299db0236f8fd5
@@ -63,13 +63,12 @@ module Google
63
63
  # See {::Google::Cloud::Kms::V1::IAMPolicy::Client::Configuration}
64
64
  # for a description of the configuration fields.
65
65
  #
66
- # ## Example
66
+ # @example
67
67
  #
68
- # To modify the configuration for all IAMPolicy clients:
69
- #
70
- # ::Google::Cloud::Kms::V1::IAMPolicy::Client.configure do |config|
71
- # config.timeout = 10.0
72
- # end
68
+ # # Modify the configuration for all IAMPolicy clients
69
+ # ::Google::Cloud::Kms::V1::IAMPolicy::Client.configure do |config|
70
+ # config.timeout = 10.0
71
+ # end
73
72
  #
74
73
  # @yield [config] Configure the Client client.
75
74
  # @yieldparam config [Client::Configuration]
@@ -116,19 +115,15 @@ module Google
116
115
  ##
117
116
  # Create a new IAMPolicy client object.
118
117
  #
119
- # ## Examples
120
- #
121
- # To create a new IAMPolicy client with the default
122
- # configuration:
123
- #
124
- # client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new
118
+ # @example
125
119
  #
126
- # To create a new IAMPolicy client with a custom
127
- # configuration:
120
+ # # Create a client using the default configuration
121
+ # client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new
128
122
  #
129
- # client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new do |config|
130
- # config.timeout = 10.0
131
- # end
123
+ # # Create a client using a custom configuration
124
+ # client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new do |config|
125
+ # config.timeout = 10.0
126
+ # end
132
127
  #
133
128
  # @yield [config] Configure the IAMPolicy client.
134
129
  # @yieldparam config [Client::Configuration]
@@ -148,10 +143,9 @@ module Google
148
143
 
149
144
  # Create credentials
150
145
  credentials = @config.credentials
151
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
146
+ # Use self-signed JWT if the endpoint is unchanged from default,
152
147
  # but only if the default endpoint does not have a region prefix.
153
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
154
- @config.endpoint == Client.configure.endpoint &&
148
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
155
149
  !@config.endpoint.split(".").first.include?("-")
156
150
  credentials ||= Credentials.default scope: @config.scope,
157
151
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -234,7 +228,9 @@ module Google
234
228
  options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
235
229
  metadata: metadata,
236
230
  retry_policy: @config.rpcs.set_iam_policy.retry_policy
237
- options.apply_defaults metadata: @config.metadata,
231
+
232
+ options.apply_defaults timeout: @config.timeout,
233
+ metadata: @config.metadata,
238
234
  retry_policy: @config.retry_policy
239
235
 
240
236
  @iam_policy_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
@@ -306,7 +302,9 @@ module Google
306
302
  options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
307
303
  metadata: metadata,
308
304
  retry_policy: @config.rpcs.get_iam_policy.retry_policy
309
- options.apply_defaults metadata: @config.metadata,
305
+
306
+ options.apply_defaults timeout: @config.timeout,
307
+ metadata: @config.metadata,
310
308
  retry_policy: @config.retry_policy
311
309
 
312
310
  @iam_policy_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
@@ -384,7 +382,9 @@ module Google
384
382
  options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
385
383
  metadata: metadata,
386
384
  retry_policy: @config.rpcs.test_iam_permissions.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
385
+
386
+ options.apply_defaults timeout: @config.timeout,
387
+ metadata: @config.metadata,
388
388
  retry_policy: @config.retry_policy
389
389
 
390
390
  @iam_policy_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
@@ -408,22 +408,21 @@ module Google
408
408
  # Configuration can be applied globally to all clients, or to a single client
409
409
  # on construction.
410
410
  #
411
- # # Examples
412
- #
413
- # To modify the global config, setting the timeout for set_iam_policy
414
- # to 20 seconds, and all remaining timeouts to 10 seconds:
415
- #
416
- # ::Google::Cloud::Kms::V1::IAMPolicy::Client.configure do |config|
417
- # config.timeout = 10.0
418
- # config.rpcs.set_iam_policy.timeout = 20.0
419
- # end
420
- #
421
- # To apply the above configuration only to a new client:
422
- #
423
- # client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new do |config|
424
- # config.timeout = 10.0
425
- # config.rpcs.set_iam_policy.timeout = 20.0
426
- # end
411
+ # @example
412
+ #
413
+ # # Modify the global config, setting the timeout for
414
+ # # set_iam_policy to 20 seconds,
415
+ # # and all remaining timeouts to 10 seconds.
416
+ # ::Google::Cloud::Kms::V1::IAMPolicy::Client.configure do |config|
417
+ # config.timeout = 10.0
418
+ # config.rpcs.set_iam_policy.timeout = 20.0
419
+ # end
420
+ #
421
+ # # Apply the above configuration only to a new client.
422
+ # client = ::Google::Cloud::Kms::V1::IAMPolicy::Client.new do |config|
423
+ # config.timeout = 10.0
424
+ # config.rpcs.set_iam_policy.timeout = 20.0
425
+ # end
427
426
  #
428
427
  # @!attribute [rw] endpoint
429
428
  # The hostname or hostname:port of the service endpoint.
@@ -52,13 +52,12 @@ module Google
52
52
  # See {::Google::Cloud::Kms::V1::KeyManagementService::Client::Configuration}
53
53
  # for a description of the configuration fields.
54
54
  #
55
- # ## Example
55
+ # @example
56
56
  #
57
- # To modify the configuration for all KeyManagementService clients:
58
- #
59
- # ::Google::Cloud::Kms::V1::KeyManagementService::Client.configure do |config|
60
- # config.timeout = 10.0
61
- # end
57
+ # # Modify the configuration for all KeyManagementService clients
58
+ # ::Google::Cloud::Kms::V1::KeyManagementService::Client.configure do |config|
59
+ # config.timeout = 10.0
60
+ # end
62
61
  #
63
62
  # @yield [config] Configure the Client client.
64
63
  # @yieldparam config [Client::Configuration]
@@ -150,38 +149,38 @@ module Google
150
149
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
151
150
  }
152
151
 
153
- default_config.rpcs.encrypt.timeout = 60.0
154
- default_config.rpcs.encrypt.retry_policy = {
152
+ default_config.rpcs.update_crypto_key_primary_version.timeout = 60.0
153
+ default_config.rpcs.update_crypto_key_primary_version.retry_policy = {
155
154
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
156
155
  }
157
156
 
158
- default_config.rpcs.decrypt.timeout = 60.0
159
- default_config.rpcs.decrypt.retry_policy = {
157
+ default_config.rpcs.destroy_crypto_key_version.timeout = 60.0
158
+ default_config.rpcs.destroy_crypto_key_version.retry_policy = {
160
159
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
161
160
  }
162
161
 
163
- default_config.rpcs.asymmetric_sign.timeout = 60.0
164
- default_config.rpcs.asymmetric_sign.retry_policy = {
162
+ default_config.rpcs.restore_crypto_key_version.timeout = 60.0
163
+ default_config.rpcs.restore_crypto_key_version.retry_policy = {
165
164
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
166
165
  }
167
166
 
168
- default_config.rpcs.asymmetric_decrypt.timeout = 60.0
169
- default_config.rpcs.asymmetric_decrypt.retry_policy = {
167
+ default_config.rpcs.encrypt.timeout = 60.0
168
+ default_config.rpcs.encrypt.retry_policy = {
170
169
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
171
170
  }
172
171
 
173
- default_config.rpcs.update_crypto_key_primary_version.timeout = 60.0
174
- default_config.rpcs.update_crypto_key_primary_version.retry_policy = {
172
+ default_config.rpcs.decrypt.timeout = 60.0
173
+ default_config.rpcs.decrypt.retry_policy = {
175
174
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
176
175
  }
177
176
 
178
- default_config.rpcs.destroy_crypto_key_version.timeout = 60.0
179
- default_config.rpcs.destroy_crypto_key_version.retry_policy = {
177
+ default_config.rpcs.asymmetric_sign.timeout = 60.0
178
+ default_config.rpcs.asymmetric_sign.retry_policy = {
180
179
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
181
180
  }
182
181
 
183
- default_config.rpcs.restore_crypto_key_version.timeout = 60.0
184
- default_config.rpcs.restore_crypto_key_version.retry_policy = {
182
+ default_config.rpcs.asymmetric_decrypt.timeout = 60.0
183
+ default_config.rpcs.asymmetric_decrypt.retry_policy = {
185
184
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
186
185
  }
187
186
 
@@ -214,19 +213,15 @@ module Google
214
213
  ##
215
214
  # Create a new KeyManagementService client object.
216
215
  #
217
- # ## Examples
218
- #
219
- # To create a new KeyManagementService client with the default
220
- # configuration:
216
+ # @example
221
217
  #
222
- # client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new
218
+ # # Create a client using the default configuration
219
+ # client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new
223
220
  #
224
- # To create a new KeyManagementService client with a custom
225
- # configuration:
226
- #
227
- # client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new do |config|
228
- # config.timeout = 10.0
229
- # end
221
+ # # Create a client using a custom configuration
222
+ # client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new do |config|
223
+ # config.timeout = 10.0
224
+ # end
230
225
  #
231
226
  # @yield [config] Configure the KeyManagementService client.
232
227
  # @yieldparam config [Client::Configuration]
@@ -246,10 +241,9 @@ module Google
246
241
 
247
242
  # Create credentials
248
243
  credentials = @config.credentials
249
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
244
+ # Use self-signed JWT if the endpoint is unchanged from default,
250
245
  # but only if the default endpoint does not have a region prefix.
251
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
252
- @config.endpoint == Client.configure.endpoint &&
246
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
253
247
  !@config.endpoint.split(".").first.include?("-")
254
248
  credentials ||= Credentials.default scope: @config.scope,
255
249
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -344,7 +338,9 @@ module Google
344
338
  options.apply_defaults timeout: @config.rpcs.list_key_rings.timeout,
345
339
  metadata: metadata,
346
340
  retry_policy: @config.rpcs.list_key_rings.retry_policy
347
- options.apply_defaults metadata: @config.metadata,
341
+
342
+ options.apply_defaults timeout: @config.timeout,
343
+ metadata: @config.metadata,
348
344
  retry_policy: @config.retry_policy
349
345
 
350
346
  @key_management_service_stub.call_rpc :list_key_rings, request, options: options do |response, operation|
@@ -432,7 +428,9 @@ module Google
432
428
  options.apply_defaults timeout: @config.rpcs.list_crypto_keys.timeout,
433
429
  metadata: metadata,
434
430
  retry_policy: @config.rpcs.list_crypto_keys.retry_policy
435
- options.apply_defaults metadata: @config.metadata,
431
+
432
+ options.apply_defaults timeout: @config.timeout,
433
+ metadata: @config.metadata,
436
434
  retry_policy: @config.retry_policy
437
435
 
438
436
  @key_management_service_stub.call_rpc :list_crypto_keys, request, options: options do |response, operation|
@@ -521,7 +519,9 @@ module Google
521
519
  options.apply_defaults timeout: @config.rpcs.list_crypto_key_versions.timeout,
522
520
  metadata: metadata,
523
521
  retry_policy: @config.rpcs.list_crypto_key_versions.retry_policy
524
- options.apply_defaults metadata: @config.metadata,
522
+
523
+ options.apply_defaults timeout: @config.timeout,
524
+ metadata: @config.metadata,
525
525
  retry_policy: @config.retry_policy
526
526
 
527
527
  @key_management_service_stub.call_rpc :list_crypto_key_versions, request, options: options do |response, operation|
@@ -607,7 +607,9 @@ module Google
607
607
  options.apply_defaults timeout: @config.rpcs.list_import_jobs.timeout,
608
608
  metadata: metadata,
609
609
  retry_policy: @config.rpcs.list_import_jobs.retry_policy
610
- options.apply_defaults metadata: @config.metadata,
610
+
611
+ options.apply_defaults timeout: @config.timeout,
612
+ metadata: @config.metadata,
611
613
  retry_policy: @config.retry_policy
612
614
 
613
615
  @key_management_service_stub.call_rpc :list_import_jobs, request, options: options do |response, operation|
@@ -674,7 +676,9 @@ module Google
674
676
  options.apply_defaults timeout: @config.rpcs.get_key_ring.timeout,
675
677
  metadata: metadata,
676
678
  retry_policy: @config.rpcs.get_key_ring.retry_policy
677
- options.apply_defaults metadata: @config.metadata,
679
+
680
+ options.apply_defaults timeout: @config.timeout,
681
+ metadata: @config.metadata,
678
682
  retry_policy: @config.retry_policy
679
683
 
680
684
  @key_management_service_stub.call_rpc :get_key_ring, request, options: options do |response, operation|
@@ -741,7 +745,9 @@ module Google
741
745
  options.apply_defaults timeout: @config.rpcs.get_crypto_key.timeout,
742
746
  metadata: metadata,
743
747
  retry_policy: @config.rpcs.get_crypto_key.retry_policy
744
- options.apply_defaults metadata: @config.metadata,
748
+
749
+ options.apply_defaults timeout: @config.timeout,
750
+ metadata: @config.metadata,
745
751
  retry_policy: @config.retry_policy
746
752
 
747
753
  @key_management_service_stub.call_rpc :get_crypto_key, request, options: options do |response, operation|
@@ -807,7 +813,9 @@ module Google
807
813
  options.apply_defaults timeout: @config.rpcs.get_crypto_key_version.timeout,
808
814
  metadata: metadata,
809
815
  retry_policy: @config.rpcs.get_crypto_key_version.retry_policy
810
- options.apply_defaults metadata: @config.metadata,
816
+
817
+ options.apply_defaults timeout: @config.timeout,
818
+ metadata: @config.metadata,
811
819
  retry_policy: @config.retry_policy
812
820
 
813
821
  @key_management_service_stub.call_rpc :get_crypto_key_version, request, options: options do |response, operation|
@@ -877,7 +885,9 @@ module Google
877
885
  options.apply_defaults timeout: @config.rpcs.get_public_key.timeout,
878
886
  metadata: metadata,
879
887
  retry_policy: @config.rpcs.get_public_key.retry_policy
880
- options.apply_defaults metadata: @config.metadata,
888
+
889
+ options.apply_defaults timeout: @config.timeout,
890
+ metadata: @config.metadata,
881
891
  retry_policy: @config.retry_policy
882
892
 
883
893
  @key_management_service_stub.call_rpc :get_public_key, request, options: options do |response, operation|
@@ -943,7 +953,9 @@ module Google
943
953
  options.apply_defaults timeout: @config.rpcs.get_import_job.timeout,
944
954
  metadata: metadata,
945
955
  retry_policy: @config.rpcs.get_import_job.retry_policy
946
- options.apply_defaults metadata: @config.metadata,
956
+
957
+ options.apply_defaults timeout: @config.timeout,
958
+ metadata: @config.metadata,
947
959
  retry_policy: @config.retry_policy
948
960
 
949
961
  @key_management_service_stub.call_rpc :get_import_job, request, options: options do |response, operation|
@@ -1015,7 +1027,9 @@ module Google
1015
1027
  options.apply_defaults timeout: @config.rpcs.create_key_ring.timeout,
1016
1028
  metadata: metadata,
1017
1029
  retry_policy: @config.rpcs.create_key_ring.retry_policy
1018
- options.apply_defaults metadata: @config.metadata,
1030
+
1031
+ options.apply_defaults timeout: @config.timeout,
1032
+ metadata: @config.metadata,
1019
1033
  retry_policy: @config.retry_policy
1020
1034
 
1021
1035
  @key_management_service_stub.call_rpc :create_key_ring, request, options: options do |response, operation|
@@ -1097,7 +1111,9 @@ module Google
1097
1111
  options.apply_defaults timeout: @config.rpcs.create_crypto_key.timeout,
1098
1112
  metadata: metadata,
1099
1113
  retry_policy: @config.rpcs.create_crypto_key.retry_policy
1100
- options.apply_defaults metadata: @config.metadata,
1114
+
1115
+ options.apply_defaults timeout: @config.timeout,
1116
+ metadata: @config.metadata,
1101
1117
  retry_policy: @config.retry_policy
1102
1118
 
1103
1119
  @key_management_service_stub.call_rpc :create_crypto_key, request, options: options do |response, operation|
@@ -1170,7 +1186,9 @@ module Google
1170
1186
  options.apply_defaults timeout: @config.rpcs.create_crypto_key_version.timeout,
1171
1187
  metadata: metadata,
1172
1188
  retry_policy: @config.rpcs.create_crypto_key_version.retry_policy
1173
- options.apply_defaults metadata: @config.metadata,
1189
+
1190
+ options.apply_defaults timeout: @config.timeout,
1191
+ metadata: @config.metadata,
1174
1192
  retry_policy: @config.retry_policy
1175
1193
 
1176
1194
  @key_management_service_stub.call_rpc :create_crypto_key_version, request, options: options do |response, operation|
@@ -1273,7 +1291,9 @@ module Google
1273
1291
  options.apply_defaults timeout: @config.rpcs.import_crypto_key_version.timeout,
1274
1292
  metadata: metadata,
1275
1293
  retry_policy: @config.rpcs.import_crypto_key_version.retry_policy
1276
- options.apply_defaults metadata: @config.metadata,
1294
+
1295
+ options.apply_defaults timeout: @config.timeout,
1296
+ metadata: @config.metadata,
1277
1297
  retry_policy: @config.retry_policy
1278
1298
 
1279
1299
  @key_management_service_stub.call_rpc :import_crypto_key_version, request, options: options do |response, operation|
@@ -1347,7 +1367,9 @@ module Google
1347
1367
  options.apply_defaults timeout: @config.rpcs.create_import_job.timeout,
1348
1368
  metadata: metadata,
1349
1369
  retry_policy: @config.rpcs.create_import_job.retry_policy
1350
- options.apply_defaults metadata: @config.metadata,
1370
+
1371
+ options.apply_defaults timeout: @config.timeout,
1372
+ metadata: @config.metadata,
1351
1373
  retry_policy: @config.retry_policy
1352
1374
 
1353
1375
  @key_management_service_stub.call_rpc :create_import_job, request, options: options do |response, operation|
@@ -1415,7 +1437,9 @@ module Google
1415
1437
  options.apply_defaults timeout: @config.rpcs.update_crypto_key.timeout,
1416
1438
  metadata: metadata,
1417
1439
  retry_policy: @config.rpcs.update_crypto_key.retry_policy
1418
- options.apply_defaults metadata: @config.metadata,
1440
+
1441
+ options.apply_defaults timeout: @config.timeout,
1442
+ metadata: @config.metadata,
1419
1443
  retry_policy: @config.retry_policy
1420
1444
 
1421
1445
  @key_management_service_stub.call_rpc :update_crypto_key, request, options: options do |response, operation|
@@ -1489,7 +1513,9 @@ module Google
1489
1513
  options.apply_defaults timeout: @config.rpcs.update_crypto_key_version.timeout,
1490
1514
  metadata: metadata,
1491
1515
  retry_policy: @config.rpcs.update_crypto_key_version.retry_policy
1492
- options.apply_defaults metadata: @config.metadata,
1516
+
1517
+ options.apply_defaults timeout: @config.timeout,
1518
+ metadata: @config.metadata,
1493
1519
  retry_policy: @config.retry_policy
1494
1520
 
1495
1521
  @key_management_service_stub.call_rpc :update_crypto_key_version, request, options: options do |response, operation|
@@ -1500,6 +1526,232 @@ module Google
1500
1526
  raise ::Google::Cloud::Error.from_error(e)
1501
1527
  end
1502
1528
 
1529
+ ##
1530
+ # Update the version of a {::Google::Cloud::Kms::V1::CryptoKey CryptoKey} that will be used in {::Google::Cloud::Kms::V1::KeyManagementService::Client#encrypt Encrypt}.
1531
+ #
1532
+ # Returns an error if called on a key whose purpose is not
1533
+ # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
1534
+ #
1535
+ # @overload update_crypto_key_primary_version(request, options = nil)
1536
+ # Pass arguments to `update_crypto_key_primary_version` via a request object, either of type
1537
+ # {::Google::Cloud::Kms::V1::UpdateCryptoKeyPrimaryVersionRequest} or an equivalent Hash.
1538
+ #
1539
+ # @param request [::Google::Cloud::Kms::V1::UpdateCryptoKeyPrimaryVersionRequest, ::Hash]
1540
+ # A request object representing the call parameters. Required. To specify no
1541
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1542
+ # @param options [::Gapic::CallOptions, ::Hash]
1543
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1544
+ #
1545
+ # @overload update_crypto_key_primary_version(name: nil, crypto_key_version_id: nil)
1546
+ # Pass arguments to `update_crypto_key_primary_version` via keyword arguments. Note that at
1547
+ # least one keyword argument is required. To specify no parameters, or to keep all
1548
+ # the default parameter values, pass an empty Hash as a request object (see above).
1549
+ #
1550
+ # @param name [::String]
1551
+ # Required. The resource name of the {::Google::Cloud::Kms::V1::CryptoKey CryptoKey} to update.
1552
+ # @param crypto_key_version_id [::String]
1553
+ # Required. The id of the child {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to use as primary.
1554
+ #
1555
+ # @yield [response, operation] Access the result along with the RPC operation
1556
+ # @yieldparam response [::Google::Cloud::Kms::V1::CryptoKey]
1557
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1558
+ #
1559
+ # @return [::Google::Cloud::Kms::V1::CryptoKey]
1560
+ #
1561
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1562
+ #
1563
+ def update_crypto_key_primary_version request, options = nil
1564
+ raise ::ArgumentError, "request must be provided" if request.nil?
1565
+
1566
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::UpdateCryptoKeyPrimaryVersionRequest
1567
+
1568
+ # Converts hash and nil to an options object
1569
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1570
+
1571
+ # Customize the options with defaults
1572
+ metadata = @config.rpcs.update_crypto_key_primary_version.metadata.to_h
1573
+
1574
+ # Set x-goog-api-client and x-goog-user-project headers
1575
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1576
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1577
+ gapic_version: ::Google::Cloud::Kms::V1::VERSION
1578
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1579
+
1580
+ header_params = {
1581
+ "name" => request.name
1582
+ }
1583
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1584
+ metadata[:"x-goog-request-params"] ||= request_params_header
1585
+
1586
+ options.apply_defaults timeout: @config.rpcs.update_crypto_key_primary_version.timeout,
1587
+ metadata: metadata,
1588
+ retry_policy: @config.rpcs.update_crypto_key_primary_version.retry_policy
1589
+
1590
+ options.apply_defaults timeout: @config.timeout,
1591
+ metadata: @config.metadata,
1592
+ retry_policy: @config.retry_policy
1593
+
1594
+ @key_management_service_stub.call_rpc :update_crypto_key_primary_version, request, options: options do |response, operation|
1595
+ yield response, operation if block_given?
1596
+ return response
1597
+ end
1598
+ rescue ::GRPC::BadStatus => e
1599
+ raise ::Google::Cloud::Error.from_error(e)
1600
+ end
1601
+
1602
+ ##
1603
+ # Schedule a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} for destruction.
1604
+ #
1605
+ # Upon calling this method, {::Google::Cloud::Kms::V1::CryptoKeyVersion#state CryptoKeyVersion.state} will be set to
1606
+ # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROY_SCHEDULED DESTROY_SCHEDULED}
1607
+ # and {::Google::Cloud::Kms::V1::CryptoKeyVersion#destroy_time destroy_time} will be set to a time 24
1608
+ # hours in the future, at which point the {::Google::Cloud::Kms::V1::CryptoKeyVersion#state state}
1609
+ # will be changed to
1610
+ # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROYED DESTROYED}, and the key
1611
+ # material will be irrevocably destroyed.
1612
+ #
1613
+ # Before the {::Google::Cloud::Kms::V1::CryptoKeyVersion#destroy_time destroy_time} is reached,
1614
+ # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion} may be called to reverse the process.
1615
+ #
1616
+ # @overload destroy_crypto_key_version(request, options = nil)
1617
+ # Pass arguments to `destroy_crypto_key_version` via a request object, either of type
1618
+ # {::Google::Cloud::Kms::V1::DestroyCryptoKeyVersionRequest} or an equivalent Hash.
1619
+ #
1620
+ # @param request [::Google::Cloud::Kms::V1::DestroyCryptoKeyVersionRequest, ::Hash]
1621
+ # A request object representing the call parameters. Required. To specify no
1622
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1623
+ # @param options [::Gapic::CallOptions, ::Hash]
1624
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1625
+ #
1626
+ # @overload destroy_crypto_key_version(name: nil)
1627
+ # Pass arguments to `destroy_crypto_key_version` via keyword arguments. Note that at
1628
+ # least one keyword argument is required. To specify no parameters, or to keep all
1629
+ # the default parameter values, pass an empty Hash as a request object (see above).
1630
+ #
1631
+ # @param name [::String]
1632
+ # Required. The resource name of the {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to destroy.
1633
+ #
1634
+ # @yield [response, operation] Access the result along with the RPC operation
1635
+ # @yieldparam response [::Google::Cloud::Kms::V1::CryptoKeyVersion]
1636
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1637
+ #
1638
+ # @return [::Google::Cloud::Kms::V1::CryptoKeyVersion]
1639
+ #
1640
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1641
+ #
1642
+ def destroy_crypto_key_version request, options = nil
1643
+ raise ::ArgumentError, "request must be provided" if request.nil?
1644
+
1645
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::DestroyCryptoKeyVersionRequest
1646
+
1647
+ # Converts hash and nil to an options object
1648
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1649
+
1650
+ # Customize the options with defaults
1651
+ metadata = @config.rpcs.destroy_crypto_key_version.metadata.to_h
1652
+
1653
+ # Set x-goog-api-client and x-goog-user-project headers
1654
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1655
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1656
+ gapic_version: ::Google::Cloud::Kms::V1::VERSION
1657
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1658
+
1659
+ header_params = {
1660
+ "name" => request.name
1661
+ }
1662
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1663
+ metadata[:"x-goog-request-params"] ||= request_params_header
1664
+
1665
+ options.apply_defaults timeout: @config.rpcs.destroy_crypto_key_version.timeout,
1666
+ metadata: metadata,
1667
+ retry_policy: @config.rpcs.destroy_crypto_key_version.retry_policy
1668
+
1669
+ options.apply_defaults timeout: @config.timeout,
1670
+ metadata: @config.metadata,
1671
+ retry_policy: @config.retry_policy
1672
+
1673
+ @key_management_service_stub.call_rpc :destroy_crypto_key_version, request, options: options do |response, operation|
1674
+ yield response, operation if block_given?
1675
+ return response
1676
+ end
1677
+ rescue ::GRPC::BadStatus => e
1678
+ raise ::Google::Cloud::Error.from_error(e)
1679
+ end
1680
+
1681
+ ##
1682
+ # Restore a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} in the
1683
+ # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROY_SCHEDULED DESTROY_SCHEDULED}
1684
+ # state.
1685
+ #
1686
+ # Upon restoration of the CryptoKeyVersion, {::Google::Cloud::Kms::V1::CryptoKeyVersion#state state}
1687
+ # will be set to {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED},
1688
+ # and {::Google::Cloud::Kms::V1::CryptoKeyVersion#destroy_time destroy_time} will be cleared.
1689
+ #
1690
+ # @overload restore_crypto_key_version(request, options = nil)
1691
+ # Pass arguments to `restore_crypto_key_version` via a request object, either of type
1692
+ # {::Google::Cloud::Kms::V1::RestoreCryptoKeyVersionRequest} or an equivalent Hash.
1693
+ #
1694
+ # @param request [::Google::Cloud::Kms::V1::RestoreCryptoKeyVersionRequest, ::Hash]
1695
+ # A request object representing the call parameters. Required. To specify no
1696
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1697
+ # @param options [::Gapic::CallOptions, ::Hash]
1698
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1699
+ #
1700
+ # @overload restore_crypto_key_version(name: nil)
1701
+ # Pass arguments to `restore_crypto_key_version` via keyword arguments. Note that at
1702
+ # least one keyword argument is required. To specify no parameters, or to keep all
1703
+ # the default parameter values, pass an empty Hash as a request object (see above).
1704
+ #
1705
+ # @param name [::String]
1706
+ # Required. The resource name of the {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to restore.
1707
+ #
1708
+ # @yield [response, operation] Access the result along with the RPC operation
1709
+ # @yieldparam response [::Google::Cloud::Kms::V1::CryptoKeyVersion]
1710
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1711
+ #
1712
+ # @return [::Google::Cloud::Kms::V1::CryptoKeyVersion]
1713
+ #
1714
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1715
+ #
1716
+ def restore_crypto_key_version request, options = nil
1717
+ raise ::ArgumentError, "request must be provided" if request.nil?
1718
+
1719
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::RestoreCryptoKeyVersionRequest
1720
+
1721
+ # Converts hash and nil to an options object
1722
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1723
+
1724
+ # Customize the options with defaults
1725
+ metadata = @config.rpcs.restore_crypto_key_version.metadata.to_h
1726
+
1727
+ # Set x-goog-api-client and x-goog-user-project headers
1728
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1729
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1730
+ gapic_version: ::Google::Cloud::Kms::V1::VERSION
1731
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1732
+
1733
+ header_params = {
1734
+ "name" => request.name
1735
+ }
1736
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1737
+ metadata[:"x-goog-request-params"] ||= request_params_header
1738
+
1739
+ options.apply_defaults timeout: @config.rpcs.restore_crypto_key_version.timeout,
1740
+ metadata: metadata,
1741
+ retry_policy: @config.rpcs.restore_crypto_key_version.retry_policy
1742
+
1743
+ options.apply_defaults timeout: @config.timeout,
1744
+ metadata: @config.metadata,
1745
+ retry_policy: @config.retry_policy
1746
+
1747
+ @key_management_service_stub.call_rpc :restore_crypto_key_version, request, options: options do |response, operation|
1748
+ yield response, operation if block_given?
1749
+ return response
1750
+ end
1751
+ rescue ::GRPC::BadStatus => e
1752
+ raise ::Google::Cloud::Error.from_error(e)
1753
+ end
1754
+
1503
1755
  ##
1504
1756
  # Encrypts data, so that it can only be recovered by a call to {::Google::Cloud::Kms::V1::KeyManagementService::Client#decrypt Decrypt}.
1505
1757
  # The {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose} must be
@@ -1559,8 +1811,6 @@ module Google
1559
1811
  # different languages. However, it is a non-negative integer, which will
1560
1812
  # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
1561
1813
  # that support this type.
1562
- #
1563
- # NOTE: This field is in Beta.
1564
1814
  # @param additional_authenticated_data_crc32c [::Google::Protobuf::Int64Value, ::Hash]
1565
1815
  # Optional. An optional CRC32C checksum of the
1566
1816
  # {::Google::Cloud::Kms::V1::EncryptRequest#additional_authenticated_data EncryptRequest.additional_authenticated_data}. If specified,
@@ -1577,8 +1827,6 @@ module Google
1577
1827
  # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
1578
1828
  # that support this type.
1579
1829
  #
1580
- # NOTE: This field is in Beta.
1581
- #
1582
1830
  # @yield [response, operation] Access the result along with the RPC operation
1583
1831
  # @yieldparam response [::Google::Cloud::Kms::V1::EncryptResponse]
1584
1832
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
@@ -1613,7 +1861,9 @@ module Google
1613
1861
  options.apply_defaults timeout: @config.rpcs.encrypt.timeout,
1614
1862
  metadata: metadata,
1615
1863
  retry_policy: @config.rpcs.encrypt.retry_policy
1616
- options.apply_defaults metadata: @config.metadata,
1864
+
1865
+ options.apply_defaults timeout: @config.timeout,
1866
+ metadata: @config.metadata,
1617
1867
  retry_policy: @config.retry_policy
1618
1868
 
1619
1869
  @key_management_service_stub.call_rpc :encrypt, request, options: options do |response, operation|
@@ -1666,8 +1916,6 @@ module Google
1666
1916
  # different languages. However, it is a non-negative integer, which will
1667
1917
  # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
1668
1918
  # that support this type.
1669
- #
1670
- # NOTE: This field is in Beta.
1671
1919
  # @param additional_authenticated_data_crc32c [::Google::Protobuf::Int64Value, ::Hash]
1672
1920
  # Optional. An optional CRC32C checksum of the
1673
1921
  # {::Google::Cloud::Kms::V1::DecryptRequest#additional_authenticated_data DecryptRequest.additional_authenticated_data}. If specified,
@@ -1684,8 +1932,6 @@ module Google
1684
1932
  # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
1685
1933
  # that support this type.
1686
1934
  #
1687
- # NOTE: This field is in Beta.
1688
- #
1689
1935
  # @yield [response, operation] Access the result along with the RPC operation
1690
1936
  # @yieldparam response [::Google::Cloud::Kms::V1::DecryptResponse]
1691
1937
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
@@ -1720,7 +1966,9 @@ module Google
1720
1966
  options.apply_defaults timeout: @config.rpcs.decrypt.timeout,
1721
1967
  metadata: metadata,
1722
1968
  retry_policy: @config.rpcs.decrypt.retry_policy
1723
- options.apply_defaults metadata: @config.metadata,
1969
+
1970
+ options.apply_defaults timeout: @config.timeout,
1971
+ metadata: @config.metadata,
1724
1972
  retry_policy: @config.retry_policy
1725
1973
 
1726
1974
  @key_management_service_stub.call_rpc :decrypt, request, options: options do |response, operation|
@@ -1772,8 +2020,6 @@ module Google
1772
2020
  # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
1773
2021
  # that support this type.
1774
2022
  #
1775
- # NOTE: This field is in Beta.
1776
- #
1777
2023
  # @yield [response, operation] Access the result along with the RPC operation
1778
2024
  # @yieldparam response [::Google::Cloud::Kms::V1::AsymmetricSignResponse]
1779
2025
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
@@ -1808,7 +2054,9 @@ module Google
1808
2054
  options.apply_defaults timeout: @config.rpcs.asymmetric_sign.timeout,
1809
2055
  metadata: metadata,
1810
2056
  retry_policy: @config.rpcs.asymmetric_sign.retry_policy
1811
- options.apply_defaults metadata: @config.metadata,
2057
+
2058
+ options.apply_defaults timeout: @config.timeout,
2059
+ metadata: @config.metadata,
1812
2060
  retry_policy: @config.retry_policy
1813
2061
 
1814
2062
  @key_management_service_stub.call_rpc :asymmetric_sign, request, options: options do |response, operation|
@@ -1860,8 +2108,6 @@ module Google
1860
2108
  # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
1861
2109
  # that support this type.
1862
2110
  #
1863
- # NOTE: This field is in Beta.
1864
- #
1865
2111
  # @yield [response, operation] Access the result along with the RPC operation
1866
2112
  # @yieldparam response [::Google::Cloud::Kms::V1::AsymmetricDecryptResponse]
1867
2113
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
@@ -1896,7 +2142,9 @@ module Google
1896
2142
  options.apply_defaults timeout: @config.rpcs.asymmetric_decrypt.timeout,
1897
2143
  metadata: metadata,
1898
2144
  retry_policy: @config.rpcs.asymmetric_decrypt.retry_policy
1899
- options.apply_defaults metadata: @config.metadata,
2145
+
2146
+ options.apply_defaults timeout: @config.timeout,
2147
+ metadata: @config.metadata,
1900
2148
  retry_policy: @config.retry_policy
1901
2149
 
1902
2150
  @key_management_service_stub.call_rpc :asymmetric_decrypt, request, options: options do |response, operation|
@@ -1908,49 +2156,63 @@ module Google
1908
2156
  end
1909
2157
 
1910
2158
  ##
1911
- # Update the version of a {::Google::Cloud::Kms::V1::CryptoKey CryptoKey} that will be used in {::Google::Cloud::Kms::V1::KeyManagementService::Client#encrypt Encrypt}.
1912
- #
1913
- # Returns an error if called on a key whose purpose is not
1914
- # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
2159
+ # Signs data using a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} with {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
2160
+ # MAC, producing a tag that can be verified by another source with the
2161
+ # same key.
1915
2162
  #
1916
- # @overload update_crypto_key_primary_version(request, options = nil)
1917
- # Pass arguments to `update_crypto_key_primary_version` via a request object, either of type
1918
- # {::Google::Cloud::Kms::V1::UpdateCryptoKeyPrimaryVersionRequest} or an equivalent Hash.
2163
+ # @overload mac_sign(request, options = nil)
2164
+ # Pass arguments to `mac_sign` via a request object, either of type
2165
+ # {::Google::Cloud::Kms::V1::MacSignRequest} or an equivalent Hash.
1919
2166
  #
1920
- # @param request [::Google::Cloud::Kms::V1::UpdateCryptoKeyPrimaryVersionRequest, ::Hash]
2167
+ # @param request [::Google::Cloud::Kms::V1::MacSignRequest, ::Hash]
1921
2168
  # A request object representing the call parameters. Required. To specify no
1922
2169
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1923
2170
  # @param options [::Gapic::CallOptions, ::Hash]
1924
2171
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1925
2172
  #
1926
- # @overload update_crypto_key_primary_version(name: nil, crypto_key_version_id: nil)
1927
- # Pass arguments to `update_crypto_key_primary_version` via keyword arguments. Note that at
2173
+ # @overload mac_sign(name: nil, data: nil, data_crc32c: nil)
2174
+ # Pass arguments to `mac_sign` via keyword arguments. Note that at
1928
2175
  # least one keyword argument is required. To specify no parameters, or to keep all
1929
2176
  # the default parameter values, pass an empty Hash as a request object (see above).
1930
2177
  #
1931
2178
  # @param name [::String]
1932
- # Required. The resource name of the {::Google::Cloud::Kms::V1::CryptoKey CryptoKey} to update.
1933
- # @param crypto_key_version_id [::String]
1934
- # Required. The id of the child {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to use as primary.
2179
+ # Required. The resource name of the {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to use for signing.
2180
+ # @param data [::String]
2181
+ # Required. The data to sign. The MAC tag is computed over this data field based on
2182
+ # the specific algorithm.
2183
+ # @param data_crc32c [::Google::Protobuf::Int64Value, ::Hash]
2184
+ # Optional. An optional CRC32C checksum of the {::Google::Cloud::Kms::V1::MacSignRequest#data MacSignRequest.data}. If
2185
+ # specified, {::Google::Cloud::Kms::V1::KeyManagementService::Client KeyManagementService} will verify the integrity of the
2186
+ # received {::Google::Cloud::Kms::V1::MacSignRequest#data MacSignRequest.data} using this checksum.
2187
+ # {::Google::Cloud::Kms::V1::KeyManagementService::Client KeyManagementService} will report an error if the checksum verification
2188
+ # fails. If you receive a checksum error, your client should verify that
2189
+ # CRC32C({::Google::Cloud::Kms::V1::MacSignRequest#data MacSignRequest.data}) is equal to
2190
+ # {::Google::Cloud::Kms::V1::MacSignRequest#data_crc32c MacSignRequest.data_crc32c}, and if so, perform a limited
2191
+ # number of retries. A persistent mismatch may indicate an issue in your
2192
+ # computation of the CRC32C checksum.
2193
+ # Note: This field is defined as int64 for reasons of compatibility across
2194
+ # different languages. However, it is a non-negative integer, which will
2195
+ # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
2196
+ # that support this type.
1935
2197
  #
1936
2198
  # @yield [response, operation] Access the result along with the RPC operation
1937
- # @yieldparam response [::Google::Cloud::Kms::V1::CryptoKey]
2199
+ # @yieldparam response [::Google::Cloud::Kms::V1::MacSignResponse]
1938
2200
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1939
2201
  #
1940
- # @return [::Google::Cloud::Kms::V1::CryptoKey]
2202
+ # @return [::Google::Cloud::Kms::V1::MacSignResponse]
1941
2203
  #
1942
2204
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1943
2205
  #
1944
- def update_crypto_key_primary_version request, options = nil
2206
+ def mac_sign request, options = nil
1945
2207
  raise ::ArgumentError, "request must be provided" if request.nil?
1946
2208
 
1947
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::UpdateCryptoKeyPrimaryVersionRequest
2209
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::MacSignRequest
1948
2210
 
1949
2211
  # Converts hash and nil to an options object
1950
2212
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1951
2213
 
1952
2214
  # Customize the options with defaults
1953
- metadata = @config.rpcs.update_crypto_key_primary_version.metadata.to_h
2215
+ metadata = @config.rpcs.mac_sign.metadata.to_h
1954
2216
 
1955
2217
  # Set x-goog-api-client and x-goog-user-project headers
1956
2218
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1964,13 +2226,15 @@ module Google
1964
2226
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1965
2227
  metadata[:"x-goog-request-params"] ||= request_params_header
1966
2228
 
1967
- options.apply_defaults timeout: @config.rpcs.update_crypto_key_primary_version.timeout,
2229
+ options.apply_defaults timeout: @config.rpcs.mac_sign.timeout,
1968
2230
  metadata: metadata,
1969
- retry_policy: @config.rpcs.update_crypto_key_primary_version.retry_policy
1970
- options.apply_defaults metadata: @config.metadata,
2231
+ retry_policy: @config.rpcs.mac_sign.retry_policy
2232
+
2233
+ options.apply_defaults timeout: @config.timeout,
2234
+ metadata: @config.metadata,
1971
2235
  retry_policy: @config.retry_policy
1972
2236
 
1973
- @key_management_service_stub.call_rpc :update_crypto_key_primary_version, request, options: options do |response, operation|
2237
+ @key_management_service_stub.call_rpc :mac_sign, request, options: options do |response, operation|
1974
2238
  yield response, operation if block_given?
1975
2239
  return response
1976
2240
  end
@@ -1979,55 +2243,79 @@ module Google
1979
2243
  end
1980
2244
 
1981
2245
  ##
1982
- # Schedule a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} for destruction.
1983
- #
1984
- # Upon calling this method, {::Google::Cloud::Kms::V1::CryptoKeyVersion#state CryptoKeyVersion.state} will be set to
1985
- # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROY_SCHEDULED DESTROY_SCHEDULED}
1986
- # and {::Google::Cloud::Kms::V1::CryptoKeyVersion#destroy_time destroy_time} will be set to a time 24
1987
- # hours in the future, at which point the {::Google::Cloud::Kms::V1::CryptoKeyVersion#state state}
1988
- # will be changed to
1989
- # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROYED DESTROYED}, and the key
1990
- # material will be irrevocably destroyed.
2246
+ # Verifies MAC tag using a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} with {::Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey.purpose}
2247
+ # MAC, and returns a response that indicates whether or not the verification
2248
+ # was successful.
1991
2249
  #
1992
- # Before the {::Google::Cloud::Kms::V1::CryptoKeyVersion#destroy_time destroy_time} is reached,
1993
- # {::Google::Cloud::Kms::V1::KeyManagementService::Client#restore_crypto_key_version RestoreCryptoKeyVersion} may be called to reverse the process.
1994
- #
1995
- # @overload destroy_crypto_key_version(request, options = nil)
1996
- # Pass arguments to `destroy_crypto_key_version` via a request object, either of type
1997
- # {::Google::Cloud::Kms::V1::DestroyCryptoKeyVersionRequest} or an equivalent Hash.
2250
+ # @overload mac_verify(request, options = nil)
2251
+ # Pass arguments to `mac_verify` via a request object, either of type
2252
+ # {::Google::Cloud::Kms::V1::MacVerifyRequest} or an equivalent Hash.
1998
2253
  #
1999
- # @param request [::Google::Cloud::Kms::V1::DestroyCryptoKeyVersionRequest, ::Hash]
2254
+ # @param request [::Google::Cloud::Kms::V1::MacVerifyRequest, ::Hash]
2000
2255
  # A request object representing the call parameters. Required. To specify no
2001
2256
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2002
2257
  # @param options [::Gapic::CallOptions, ::Hash]
2003
2258
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2004
2259
  #
2005
- # @overload destroy_crypto_key_version(name: nil)
2006
- # Pass arguments to `destroy_crypto_key_version` via keyword arguments. Note that at
2260
+ # @overload mac_verify(name: nil, data: nil, data_crc32c: nil, mac: nil, mac_crc32c: nil)
2261
+ # Pass arguments to `mac_verify` via keyword arguments. Note that at
2007
2262
  # least one keyword argument is required. To specify no parameters, or to keep all
2008
2263
  # the default parameter values, pass an empty Hash as a request object (see above).
2009
2264
  #
2010
2265
  # @param name [::String]
2011
- # Required. The resource name of the {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to destroy.
2266
+ # Required. The resource name of the {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to use for verification.
2267
+ # @param data [::String]
2268
+ # Required. The data used previously as a {::Google::Cloud::Kms::V1::MacSignRequest#data MacSignRequest.data} to generate the MAC
2269
+ # tag.
2270
+ # @param data_crc32c [::Google::Protobuf::Int64Value, ::Hash]
2271
+ # Optional. An optional CRC32C checksum of the {::Google::Cloud::Kms::V1::MacVerifyRequest#data MacVerifyRequest.data}. If
2272
+ # specified, {::Google::Cloud::Kms::V1::KeyManagementService::Client KeyManagementService} will verify the integrity of the
2273
+ # received {::Google::Cloud::Kms::V1::MacVerifyRequest#data MacVerifyRequest.data} using this checksum.
2274
+ # {::Google::Cloud::Kms::V1::KeyManagementService::Client KeyManagementService} will report an error if the checksum verification
2275
+ # fails. If you receive a checksum error, your client should verify that
2276
+ # CRC32C({::Google::Cloud::Kms::V1::MacVerifyRequest#data MacVerifyRequest.data}) is equal to
2277
+ # {::Google::Cloud::Kms::V1::MacVerifyRequest#data_crc32c MacVerifyRequest.data_crc32c}, and if so, perform a limited
2278
+ # number of retries. A persistent mismatch may indicate an issue in your
2279
+ # computation of the CRC32C checksum.
2280
+ # Note: This field is defined as int64 for reasons of compatibility across
2281
+ # different languages. However, it is a non-negative integer, which will
2282
+ # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
2283
+ # that support this type.
2284
+ # @param mac [::String]
2285
+ # Required. The signature to verify.
2286
+ # @param mac_crc32c [::Google::Protobuf::Int64Value, ::Hash]
2287
+ # Optional. An optional CRC32C checksum of the {::Google::Cloud::Kms::V1::MacVerifyRequest#mac MacVerifyRequest.mac}. If
2288
+ # specified, {::Google::Cloud::Kms::V1::KeyManagementService::Client KeyManagementService} will verify the integrity of the
2289
+ # received {::Google::Cloud::Kms::V1::MacVerifyRequest#mac MacVerifyRequest.mac} using this checksum.
2290
+ # {::Google::Cloud::Kms::V1::KeyManagementService::Client KeyManagementService} will report an error if the checksum verification
2291
+ # fails. If you receive a checksum error, your client should verify that
2292
+ # CRC32C([MacVerifyRequest.tag][]) is equal to
2293
+ # {::Google::Cloud::Kms::V1::MacVerifyRequest#mac_crc32c MacVerifyRequest.mac_crc32c}, and if so, perform a limited
2294
+ # number of retries. A persistent mismatch may indicate an issue in your
2295
+ # computation of the CRC32C checksum.
2296
+ # Note: This field is defined as int64 for reasons of compatibility across
2297
+ # different languages. However, it is a non-negative integer, which will
2298
+ # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
2299
+ # that support this type.
2012
2300
  #
2013
2301
  # @yield [response, operation] Access the result along with the RPC operation
2014
- # @yieldparam response [::Google::Cloud::Kms::V1::CryptoKeyVersion]
2302
+ # @yieldparam response [::Google::Cloud::Kms::V1::MacVerifyResponse]
2015
2303
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
2016
2304
  #
2017
- # @return [::Google::Cloud::Kms::V1::CryptoKeyVersion]
2305
+ # @return [::Google::Cloud::Kms::V1::MacVerifyResponse]
2018
2306
  #
2019
2307
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2020
2308
  #
2021
- def destroy_crypto_key_version request, options = nil
2309
+ def mac_verify request, options = nil
2022
2310
  raise ::ArgumentError, "request must be provided" if request.nil?
2023
2311
 
2024
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::DestroyCryptoKeyVersionRequest
2312
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::MacVerifyRequest
2025
2313
 
2026
2314
  # Converts hash and nil to an options object
2027
2315
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2028
2316
 
2029
2317
  # Customize the options with defaults
2030
- metadata = @config.rpcs.destroy_crypto_key_version.metadata.to_h
2318
+ metadata = @config.rpcs.mac_verify.metadata.to_h
2031
2319
 
2032
2320
  # Set x-goog-api-client and x-goog-user-project headers
2033
2321
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2041,13 +2329,15 @@ module Google
2041
2329
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2042
2330
  metadata[:"x-goog-request-params"] ||= request_params_header
2043
2331
 
2044
- options.apply_defaults timeout: @config.rpcs.destroy_crypto_key_version.timeout,
2332
+ options.apply_defaults timeout: @config.rpcs.mac_verify.timeout,
2045
2333
  metadata: metadata,
2046
- retry_policy: @config.rpcs.destroy_crypto_key_version.retry_policy
2047
- options.apply_defaults metadata: @config.metadata,
2334
+ retry_policy: @config.rpcs.mac_verify.retry_policy
2335
+
2336
+ options.apply_defaults timeout: @config.timeout,
2337
+ metadata: @config.metadata,
2048
2338
  retry_policy: @config.retry_policy
2049
2339
 
2050
- @key_management_service_stub.call_rpc :destroy_crypto_key_version, request, options: options do |response, operation|
2340
+ @key_management_service_stub.call_rpc :mac_verify, request, options: options do |response, operation|
2051
2341
  yield response, operation if block_given?
2052
2342
  return response
2053
2343
  end
@@ -2056,50 +2346,52 @@ module Google
2056
2346
  end
2057
2347
 
2058
2348
  ##
2059
- # Restore a {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} in the
2060
- # {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROY_SCHEDULED DESTROY_SCHEDULED}
2061
- # state.
2062
- #
2063
- # Upon restoration of the CryptoKeyVersion, {::Google::Cloud::Kms::V1::CryptoKeyVersion#state state}
2064
- # will be set to {::Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED},
2065
- # and {::Google::Cloud::Kms::V1::CryptoKeyVersion#destroy_time destroy_time} will be cleared.
2349
+ # Generate random bytes using the Cloud KMS randomness source in the provided
2350
+ # location.
2066
2351
  #
2067
- # @overload restore_crypto_key_version(request, options = nil)
2068
- # Pass arguments to `restore_crypto_key_version` via a request object, either of type
2069
- # {::Google::Cloud::Kms::V1::RestoreCryptoKeyVersionRequest} or an equivalent Hash.
2352
+ # @overload generate_random_bytes(request, options = nil)
2353
+ # Pass arguments to `generate_random_bytes` via a request object, either of type
2354
+ # {::Google::Cloud::Kms::V1::GenerateRandomBytesRequest} or an equivalent Hash.
2070
2355
  #
2071
- # @param request [::Google::Cloud::Kms::V1::RestoreCryptoKeyVersionRequest, ::Hash]
2356
+ # @param request [::Google::Cloud::Kms::V1::GenerateRandomBytesRequest, ::Hash]
2072
2357
  # A request object representing the call parameters. Required. To specify no
2073
2358
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2074
2359
  # @param options [::Gapic::CallOptions, ::Hash]
2075
2360
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2076
2361
  #
2077
- # @overload restore_crypto_key_version(name: nil)
2078
- # Pass arguments to `restore_crypto_key_version` via keyword arguments. Note that at
2362
+ # @overload generate_random_bytes(location: nil, length_bytes: nil, protection_level: nil)
2363
+ # Pass arguments to `generate_random_bytes` via keyword arguments. Note that at
2079
2364
  # least one keyword argument is required. To specify no parameters, or to keep all
2080
2365
  # the default parameter values, pass an empty Hash as a request object (see above).
2081
2366
  #
2082
- # @param name [::String]
2083
- # Required. The resource name of the {::Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to restore.
2367
+ # @param location [::String]
2368
+ # The project-specific location in which to generate random bytes.
2369
+ # For example, "projects/my-project/locations/us-central1".
2370
+ # @param length_bytes [::Integer]
2371
+ # The length in bytes of the amount of randomness to retrieve. Minimum 8
2372
+ # bytes, maximum 1024 bytes.
2373
+ # @param protection_level [::Google::Cloud::Kms::V1::ProtectionLevel]
2374
+ # The {::Google::Cloud::Kms::V1::ProtectionLevel ProtectionLevel} to use when generating the random data. Defaults to
2375
+ # {::Google::Cloud::Kms::V1::ProtectionLevel::SOFTWARE SOFTWARE}.
2084
2376
  #
2085
2377
  # @yield [response, operation] Access the result along with the RPC operation
2086
- # @yieldparam response [::Google::Cloud::Kms::V1::CryptoKeyVersion]
2378
+ # @yieldparam response [::Google::Cloud::Kms::V1::GenerateRandomBytesResponse]
2087
2379
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
2088
2380
  #
2089
- # @return [::Google::Cloud::Kms::V1::CryptoKeyVersion]
2381
+ # @return [::Google::Cloud::Kms::V1::GenerateRandomBytesResponse]
2090
2382
  #
2091
2383
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2092
2384
  #
2093
- def restore_crypto_key_version request, options = nil
2385
+ def generate_random_bytes request, options = nil
2094
2386
  raise ::ArgumentError, "request must be provided" if request.nil?
2095
2387
 
2096
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::RestoreCryptoKeyVersionRequest
2388
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::GenerateRandomBytesRequest
2097
2389
 
2098
2390
  # Converts hash and nil to an options object
2099
2391
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2100
2392
 
2101
2393
  # Customize the options with defaults
2102
- metadata = @config.rpcs.restore_crypto_key_version.metadata.to_h
2394
+ metadata = @config.rpcs.generate_random_bytes.metadata.to_h
2103
2395
 
2104
2396
  # Set x-goog-api-client and x-goog-user-project headers
2105
2397
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2108,18 +2400,20 @@ module Google
2108
2400
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2109
2401
 
2110
2402
  header_params = {
2111
- "name" => request.name
2403
+ "location" => request.location
2112
2404
  }
2113
2405
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2114
2406
  metadata[:"x-goog-request-params"] ||= request_params_header
2115
2407
 
2116
- options.apply_defaults timeout: @config.rpcs.restore_crypto_key_version.timeout,
2408
+ options.apply_defaults timeout: @config.rpcs.generate_random_bytes.timeout,
2117
2409
  metadata: metadata,
2118
- retry_policy: @config.rpcs.restore_crypto_key_version.retry_policy
2119
- options.apply_defaults metadata: @config.metadata,
2410
+ retry_policy: @config.rpcs.generate_random_bytes.retry_policy
2411
+
2412
+ options.apply_defaults timeout: @config.timeout,
2413
+ metadata: @config.metadata,
2120
2414
  retry_policy: @config.retry_policy
2121
2415
 
2122
- @key_management_service_stub.call_rpc :restore_crypto_key_version, request, options: options do |response, operation|
2416
+ @key_management_service_stub.call_rpc :generate_random_bytes, request, options: options do |response, operation|
2123
2417
  yield response, operation if block_given?
2124
2418
  return response
2125
2419
  end
@@ -2140,22 +2434,21 @@ module Google
2140
2434
  # Configuration can be applied globally to all clients, or to a single client
2141
2435
  # on construction.
2142
2436
  #
2143
- # # Examples
2437
+ # @example
2144
2438
  #
2145
- # To modify the global config, setting the timeout for list_key_rings
2146
- # to 20 seconds, and all remaining timeouts to 10 seconds:
2439
+ # # Modify the global config, setting the timeout for
2440
+ # # list_key_rings to 20 seconds,
2441
+ # # and all remaining timeouts to 10 seconds.
2442
+ # ::Google::Cloud::Kms::V1::KeyManagementService::Client.configure do |config|
2443
+ # config.timeout = 10.0
2444
+ # config.rpcs.list_key_rings.timeout = 20.0
2445
+ # end
2147
2446
  #
2148
- # ::Google::Cloud::Kms::V1::KeyManagementService::Client.configure do |config|
2149
- # config.timeout = 10.0
2150
- # config.rpcs.list_key_rings.timeout = 20.0
2151
- # end
2152
- #
2153
- # To apply the above configuration only to a new client:
2154
- #
2155
- # client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new do |config|
2156
- # config.timeout = 10.0
2157
- # config.rpcs.list_key_rings.timeout = 20.0
2158
- # end
2447
+ # # Apply the above configuration only to a new client.
2448
+ # client = ::Google::Cloud::Kms::V1::KeyManagementService::Client.new do |config|
2449
+ # config.timeout = 10.0
2450
+ # config.rpcs.list_key_rings.timeout = 20.0
2451
+ # end
2159
2452
  #
2160
2453
  # @!attribute [rw] endpoint
2161
2454
  # The hostname or hostname:port of the service endpoint.
@@ -2344,6 +2637,21 @@ module Google
2344
2637
  #
2345
2638
  attr_reader :update_crypto_key_version
2346
2639
  ##
2640
+ # RPC-specific configuration for `update_crypto_key_primary_version`
2641
+ # @return [::Gapic::Config::Method]
2642
+ #
2643
+ attr_reader :update_crypto_key_primary_version
2644
+ ##
2645
+ # RPC-specific configuration for `destroy_crypto_key_version`
2646
+ # @return [::Gapic::Config::Method]
2647
+ #
2648
+ attr_reader :destroy_crypto_key_version
2649
+ ##
2650
+ # RPC-specific configuration for `restore_crypto_key_version`
2651
+ # @return [::Gapic::Config::Method]
2652
+ #
2653
+ attr_reader :restore_crypto_key_version
2654
+ ##
2347
2655
  # RPC-specific configuration for `encrypt`
2348
2656
  # @return [::Gapic::Config::Method]
2349
2657
  #
@@ -2364,20 +2672,20 @@ module Google
2364
2672
  #
2365
2673
  attr_reader :asymmetric_decrypt
2366
2674
  ##
2367
- # RPC-specific configuration for `update_crypto_key_primary_version`
2675
+ # RPC-specific configuration for `mac_sign`
2368
2676
  # @return [::Gapic::Config::Method]
2369
2677
  #
2370
- attr_reader :update_crypto_key_primary_version
2678
+ attr_reader :mac_sign
2371
2679
  ##
2372
- # RPC-specific configuration for `destroy_crypto_key_version`
2680
+ # RPC-specific configuration for `mac_verify`
2373
2681
  # @return [::Gapic::Config::Method]
2374
2682
  #
2375
- attr_reader :destroy_crypto_key_version
2683
+ attr_reader :mac_verify
2376
2684
  ##
2377
- # RPC-specific configuration for `restore_crypto_key_version`
2685
+ # RPC-specific configuration for `generate_random_bytes`
2378
2686
  # @return [::Gapic::Config::Method]
2379
2687
  #
2380
- attr_reader :restore_crypto_key_version
2688
+ attr_reader :generate_random_bytes
2381
2689
 
2382
2690
  # @private
2383
2691
  def initialize parent_rpcs = nil
@@ -2413,6 +2721,12 @@ module Google
2413
2721
  @update_crypto_key = ::Gapic::Config::Method.new update_crypto_key_config
2414
2722
  update_crypto_key_version_config = parent_rpcs.update_crypto_key_version if parent_rpcs.respond_to? :update_crypto_key_version
2415
2723
  @update_crypto_key_version = ::Gapic::Config::Method.new update_crypto_key_version_config
2724
+ update_crypto_key_primary_version_config = parent_rpcs.update_crypto_key_primary_version if parent_rpcs.respond_to? :update_crypto_key_primary_version
2725
+ @update_crypto_key_primary_version = ::Gapic::Config::Method.new update_crypto_key_primary_version_config
2726
+ destroy_crypto_key_version_config = parent_rpcs.destroy_crypto_key_version if parent_rpcs.respond_to? :destroy_crypto_key_version
2727
+ @destroy_crypto_key_version = ::Gapic::Config::Method.new destroy_crypto_key_version_config
2728
+ restore_crypto_key_version_config = parent_rpcs.restore_crypto_key_version if parent_rpcs.respond_to? :restore_crypto_key_version
2729
+ @restore_crypto_key_version = ::Gapic::Config::Method.new restore_crypto_key_version_config
2416
2730
  encrypt_config = parent_rpcs.encrypt if parent_rpcs.respond_to? :encrypt
2417
2731
  @encrypt = ::Gapic::Config::Method.new encrypt_config
2418
2732
  decrypt_config = parent_rpcs.decrypt if parent_rpcs.respond_to? :decrypt
@@ -2421,12 +2735,12 @@ module Google
2421
2735
  @asymmetric_sign = ::Gapic::Config::Method.new asymmetric_sign_config
2422
2736
  asymmetric_decrypt_config = parent_rpcs.asymmetric_decrypt if parent_rpcs.respond_to? :asymmetric_decrypt
2423
2737
  @asymmetric_decrypt = ::Gapic::Config::Method.new asymmetric_decrypt_config
2424
- update_crypto_key_primary_version_config = parent_rpcs.update_crypto_key_primary_version if parent_rpcs.respond_to? :update_crypto_key_primary_version
2425
- @update_crypto_key_primary_version = ::Gapic::Config::Method.new update_crypto_key_primary_version_config
2426
- destroy_crypto_key_version_config = parent_rpcs.destroy_crypto_key_version if parent_rpcs.respond_to? :destroy_crypto_key_version
2427
- @destroy_crypto_key_version = ::Gapic::Config::Method.new destroy_crypto_key_version_config
2428
- restore_crypto_key_version_config = parent_rpcs.restore_crypto_key_version if parent_rpcs.respond_to? :restore_crypto_key_version
2429
- @restore_crypto_key_version = ::Gapic::Config::Method.new restore_crypto_key_version_config
2738
+ mac_sign_config = parent_rpcs.mac_sign if parent_rpcs.respond_to? :mac_sign
2739
+ @mac_sign = ::Gapic::Config::Method.new mac_sign_config
2740
+ mac_verify_config = parent_rpcs.mac_verify if parent_rpcs.respond_to? :mac_verify
2741
+ @mac_verify = ::Gapic::Config::Method.new mac_verify_config
2742
+ generate_random_bytes_config = parent_rpcs.generate_random_bytes if parent_rpcs.respond_to? :generate_random_bytes
2743
+ @generate_random_bytes = ::Gapic::Config::Method.new generate_random_bytes_config
2430
2744
 
2431
2745
  yield self if block_given?
2432
2746
  end