diff --git a/packages/google-cloud-kms/samples/generated/v1/ekm_service.create_ekm_connection.js b/packages/google-cloud-kms/samples/generated/v1/ekm_service.create_ekm_connection.js index ffa0ee0f6da..20cf4e1d080 100644 --- a/packages/google-cloud-kms/samples/generated/v1/ekm_service.create_ekm_connection.js +++ b/packages/google-cloud-kms/samples/generated/v1/ekm_service.create_ekm_connection.js @@ -23,6 +23,9 @@ function main(parent, ekmConnectionId, ekmConnection) { // [START cloudkms_v1_generated_EkmService_CreateEkmConnection_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_connection.js b/packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_connection.js index b249163cbad..80d65151dc5 100644 --- a/packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_connection.js +++ b/packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_connection.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudkms_v1_generated_EkmService_GetEkmConnection_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/ekm_service.list_ekm_connections.js b/packages/google-cloud-kms/samples/generated/v1/ekm_service.list_ekm_connections.js index 9a6e9b64fea..d3bac46d713 100644 --- a/packages/google-cloud-kms/samples/generated/v1/ekm_service.list_ekm_connections.js +++ b/packages/google-cloud-kms/samples/generated/v1/ekm_service.list_ekm_connections.js @@ -23,6 +23,9 @@ function main(parent) { // [START cloudkms_v1_generated_EkmService_ListEkmConnections_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_connection.js b/packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_connection.js index 66ddc32b5b8..0fadde190c4 100644 --- a/packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_connection.js +++ b/packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_connection.js @@ -23,6 +23,9 @@ function main(ekmConnection, updateMask) { // [START cloudkms_v1_generated_EkmService_UpdateEkmConnection_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_decrypt.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_decrypt.js index a148cf9a7f9..6e772ba2b78 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_decrypt.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_decrypt.js @@ -23,6 +23,9 @@ function main(name, ciphertext) { // [START cloudkms_v1_generated_KeyManagementService_AsymmetricDecrypt_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_sign.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_sign.js index 1877b0ade1c..4e01afcc121 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_sign.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_sign.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudkms_v1_generated_KeyManagementService_AsymmetricSign_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key.js index 7c717e22e89..2d9d8b43f30 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key.js @@ -23,6 +23,9 @@ function main(parent, cryptoKeyId, cryptoKey) { // [START cloudkms_v1_generated_KeyManagementService_CreateCryptoKey_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key_version.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key_version.js index 295a41d0c1b..bda6f33b362 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key_version.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key_version.js @@ -23,6 +23,9 @@ function main(parent, cryptoKeyVersion) { // [START cloudkms_v1_generated_KeyManagementService_CreateCryptoKeyVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_import_job.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_import_job.js index f11b1c89a42..93b266b95a9 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_import_job.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_import_job.js @@ -23,6 +23,9 @@ function main(parent, importJobId, importJob) { // [START cloudkms_v1_generated_KeyManagementService_CreateImportJob_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_key_ring.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_key_ring.js index 951be4dbeb3..f27db38419a 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_key_ring.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_key_ring.js @@ -23,6 +23,9 @@ function main(parent, keyRingId, keyRing) { // [START cloudkms_v1_generated_KeyManagementService_CreateKeyRing_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.decrypt.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.decrypt.js index fd2e7d74bdf..fa70e8bf558 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.decrypt.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.decrypt.js @@ -23,6 +23,9 @@ function main(name, ciphertext) { // [START cloudkms_v1_generated_KeyManagementService_Decrypt_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.destroy_crypto_key_version.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.destroy_crypto_key_version.js index 75294ff06bc..62205e8e099 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.destroy_crypto_key_version.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.destroy_crypto_key_version.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudkms_v1_generated_KeyManagementService_DestroyCryptoKeyVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.encrypt.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.encrypt.js index 172b8236f85..b3a69376f2b 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.encrypt.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.encrypt.js @@ -23,6 +23,9 @@ function main(name, plaintext) { // [START cloudkms_v1_generated_KeyManagementService_Encrypt_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.generate_random_bytes.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.generate_random_bytes.js index 80aaee7712d..1136d8c30c5 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.generate_random_bytes.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.generate_random_bytes.js @@ -23,6 +23,9 @@ function main() { // [START cloudkms_v1_generated_KeyManagementService_GenerateRandomBytes_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key.js index 1ecd812b907..feac5763327 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudkms_v1_generated_KeyManagementService_GetCryptoKey_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key_version.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key_version.js index 87b6bfa7aab..45d20671715 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key_version.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key_version.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudkms_v1_generated_KeyManagementService_GetCryptoKeyVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_import_job.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_import_job.js index bb68270ced1..a2ad85f10fb 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_import_job.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_import_job.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudkms_v1_generated_KeyManagementService_GetImportJob_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_key_ring.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_key_ring.js index ca4efde47f8..7b196a918a6 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_key_ring.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_key_ring.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudkms_v1_generated_KeyManagementService_GetKeyRing_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_public_key.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_public_key.js index fbdf9d1bf72..4ed8b8f64a9 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_public_key.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_public_key.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudkms_v1_generated_KeyManagementService_GetPublicKey_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.import_crypto_key_version.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.import_crypto_key_version.js index 315b3048d77..9aa2b37b0b8 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.import_crypto_key_version.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.import_crypto_key_version.js @@ -23,6 +23,9 @@ function main(parent, algorithm, importJob) { // [START cloudkms_v1_generated_KeyManagementService_ImportCryptoKeyVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_key_versions.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_key_versions.js index ad5c2cc09db..ac7a0f046d6 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_key_versions.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_key_versions.js @@ -23,6 +23,9 @@ function main(parent) { // [START cloudkms_v1_generated_KeyManagementService_ListCryptoKeyVersions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_keys.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_keys.js index 1c22065eed8..697f55b014d 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_keys.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_keys.js @@ -23,6 +23,9 @@ function main(parent) { // [START cloudkms_v1_generated_KeyManagementService_ListCryptoKeys_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_import_jobs.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_import_jobs.js index 00198e1cc65..856ac38442a 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_import_jobs.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_import_jobs.js @@ -23,6 +23,9 @@ function main(parent) { // [START cloudkms_v1_generated_KeyManagementService_ListImportJobs_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_key_rings.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_key_rings.js index f7555209aa7..3e835568813 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_key_rings.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_key_rings.js @@ -23,6 +23,9 @@ function main(parent) { // [START cloudkms_v1_generated_KeyManagementService_ListKeyRings_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_sign.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_sign.js index 19c8b9af6b2..c9d0487a468 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_sign.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_sign.js @@ -23,6 +23,9 @@ function main(name, data) { // [START cloudkms_v1_generated_KeyManagementService_MacSign_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_verify.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_verify.js index e0a1baa8ac3..a21f154a09f 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_verify.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_verify.js @@ -23,6 +23,9 @@ function main(name, data, mac) { // [START cloudkms_v1_generated_KeyManagementService_MacVerify_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.restore_crypto_key_version.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.restore_crypto_key_version.js index d0b08fa1765..97abe6550e7 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.restore_crypto_key_version.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.restore_crypto_key_version.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudkms_v1_generated_KeyManagementService_RestoreCryptoKeyVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key.js index d0f26013b32..cd0b706adc3 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key.js @@ -23,6 +23,9 @@ function main(cryptoKey, updateMask) { // [START cloudkms_v1_generated_KeyManagementService_UpdateCryptoKey_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_primary_version.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_primary_version.js index 6b090968fa2..2fe88da644e 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_primary_version.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_primary_version.js @@ -23,6 +23,9 @@ function main(name, cryptoKeyVersionId) { // [START cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyPrimaryVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_version.js b/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_version.js index 620f9d291c2..c90e7dd2f19 100644 --- a/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_version.js +++ b/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_version.js @@ -23,6 +23,9 @@ function main(cryptoKeyVersion, updateMask) { // [START cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyVersion_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json index 1afd4908e54..f701f0a5916 100644 --- a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json +++ b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 83, + "end": 86, "type": "FULL" } ], @@ -78,7 +78,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -166,7 +166,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -210,7 +210,7 @@ "segments": [ { "start": 25, - "end": 83, + "end": 86, "type": "FULL" } ], @@ -266,7 +266,7 @@ "segments": [ { "start": 25, - "end": 86, + "end": 89, "type": "FULL" } ], @@ -326,7 +326,7 @@ "segments": [ { "start": 25, - "end": 87, + "end": 90, "type": "FULL" } ], @@ -386,7 +386,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 85, "type": "FULL" } ], @@ -442,7 +442,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -482,7 +482,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -522,7 +522,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -562,7 +562,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -602,7 +602,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -642,7 +642,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -690,7 +690,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -742,7 +742,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -786,7 +786,7 @@ "segments": [ { "start": 25, - "end": 115, + "end": 118, "type": "FULL" } ], @@ -842,7 +842,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -890,7 +890,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -934,7 +934,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -978,7 +978,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -1022,7 +1022,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1062,7 +1062,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1102,7 +1102,7 @@ "segments": [ { "start": 25, - "end": 124, + "end": 127, "type": "FULL" } ], @@ -1158,7 +1158,7 @@ "segments": [ { "start": 25, - "end": 107, + "end": 110, "type": "FULL" } ], @@ -1214,7 +1214,7 @@ "segments": [ { "start": 25, - "end": 112, + "end": 115, "type": "FULL" } ], @@ -1270,7 +1270,7 @@ "segments": [ { "start": 25, - "end": 81, + "end": 84, "type": "FULL" } ], @@ -1318,7 +1318,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 81, "type": "FULL" } ], @@ -1366,7 +1366,7 @@ "segments": [ { "start": 25, - "end": 104, + "end": 107, "type": "FULL" } ], @@ -1422,7 +1422,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], diff --git a/packages/google-cloud-kms/src/v1/ekm_service_client.ts b/packages/google-cloud-kms/src/v1/ekm_service_client.ts index 74eaa3931ef..305f1e15013 100644 --- a/packages/google-cloud-kms/src/v1/ekm_service_client.ts +++ b/packages/google-cloud-kms/src/v1/ekm_service_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -279,7 +278,8 @@ export class EkmServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -783,7 +783,7 @@ export class EkmServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEkmConnections.createStream( - this.innerApiCalls.listEkmConnections as gax.GaxCall, + this.innerApiCalls.listEkmConnections as GaxCall, request, callSettings ); @@ -850,7 +850,7 @@ export class EkmServiceClient { this.initialize(); return this.descriptors.page.listEkmConnections.asyncIterate( this.innerApiCalls['listEkmConnections'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-kms/src/v1/key_management_service_client.ts b/packages/google-cloud-kms/src/v1/key_management_service_client.ts index 201ab03a687..9411e055dd0 100644 --- a/packages/google-cloud-kms/src/v1/key_management_service_client.ts +++ b/packages/google-cloud-kms/src/v1/key_management_service_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -323,7 +322,8 @@ export class KeyManagementServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -2946,7 +2946,7 @@ export class KeyManagementServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listKeyRings.createStream( - this.innerApiCalls.listKeyRings as gax.GaxCall, + this.innerApiCalls.listKeyRings as GaxCall, request, callSettings ); @@ -3013,7 +3013,7 @@ export class KeyManagementServiceClient { this.initialize(); return this.descriptors.page.listKeyRings.asyncIterate( this.innerApiCalls['listKeyRings'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3186,7 +3186,7 @@ export class KeyManagementServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCryptoKeys.createStream( - this.innerApiCalls.listCryptoKeys as gax.GaxCall, + this.innerApiCalls.listCryptoKeys as GaxCall, request, callSettings ); @@ -3254,7 +3254,7 @@ export class KeyManagementServiceClient { this.initialize(); return this.descriptors.page.listCryptoKeys.asyncIterate( this.innerApiCalls['listCryptoKeys'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3437,7 +3437,7 @@ export class KeyManagementServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCryptoKeyVersions.createStream( - this.innerApiCalls.listCryptoKeyVersions as gax.GaxCall, + this.innerApiCalls.listCryptoKeyVersions as GaxCall, request, callSettings ); @@ -3506,7 +3506,7 @@ export class KeyManagementServiceClient { this.initialize(); return this.descriptors.page.listCryptoKeyVersions.asyncIterate( this.innerApiCalls['listCryptoKeyVersions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3675,7 +3675,7 @@ export class KeyManagementServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listImportJobs.createStream( - this.innerApiCalls.listImportJobs as gax.GaxCall, + this.innerApiCalls.listImportJobs as GaxCall, request, callSettings ); @@ -3741,7 +3741,7 @@ export class KeyManagementServiceClient { this.initialize(); return this.descriptors.page.listImportJobs.asyncIterate( this.innerApiCalls['listImportJobs'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts b/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts index e90fe093544..911def750c1 100644 --- a/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts +++ b/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts @@ -113,99 +113,101 @@ function stubAsyncIterationCall( } describe('v1.EkmServiceClient', () => { - it('has servicePath', () => { - const servicePath = ekmserviceModule.v1.EkmServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = ekmserviceModule.v1.EkmServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = ekmserviceModule.v1.EkmServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new ekmserviceModule.v1.EkmServiceClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = ekmserviceModule.v1.EkmServiceClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new ekmserviceModule.v1.EkmServiceClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = ekmserviceModule.v1.EkmServiceClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new ekmserviceModule.v1.EkmServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = ekmserviceModule.v1.EkmServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.ekmServiceStub, undefined); - await client.initialize(); - assert(client.ekmServiceStub); - }); - it('has close method for the initialized client', done => { - const client = new ekmserviceModule.v1.EkmServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new ekmserviceModule.v1.EkmServiceClient(); + assert(client); }); - client.initialize(); - assert(client.ekmServiceStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new ekmserviceModule.v1.EkmServiceClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new ekmserviceModule.v1.EkmServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new ekmserviceModule.v1.EkmServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.ekmServiceStub, undefined); + await client.initialize(); + assert(client.ekmServiceStub); }); - assert.strictEqual(client.ekmServiceStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new ekmserviceModule.v1.EkmServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.ekmServiceStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new ekmserviceModule.v1.EkmServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new ekmserviceModule.v1.EkmServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.ekmServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new ekmserviceModule.v1.EkmServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new ekmserviceModule.v1.EkmServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new ekmserviceModule.v1.EkmServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getEkmConnection', () => { diff --git a/packages/google-cloud-kms/test/gapic_key_management_service_v1.ts b/packages/google-cloud-kms/test/gapic_key_management_service_v1.ts index 7209d750237..e2a323051c3 100644 --- a/packages/google-cloud-kms/test/gapic_key_management_service_v1.ts +++ b/packages/google-cloud-kms/test/gapic_key_management_service_v1.ts @@ -113,114 +113,111 @@ function stubAsyncIterationCall( } describe('v1.KeyManagementServiceClient', () => { - it('has servicePath', () => { - const servicePath = - keymanagementserviceModule.v1.KeyManagementServiceClient.servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + keymanagementserviceModule.v1.KeyManagementServiceClient.servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - keymanagementserviceModule.v1.KeyManagementServiceClient.apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + keymanagementserviceModule.v1.KeyManagementServiceClient.apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = keymanagementserviceModule.v1.KeyManagementServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + keymanagementserviceModule.v1.KeyManagementServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new keymanagementserviceModule.v1.KeyManagementServiceClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new keymanagementserviceModule.v1.KeyManagementServiceClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = new keymanagementserviceModule.v1.KeyManagementServiceClient( - { - fallback: true, - } - ); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new keymanagementserviceModule.v1.KeyManagementServiceClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = new keymanagementserviceModule.v1.KeyManagementServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.keyManagementServiceStub, undefined); - await client.initialize(); - assert(client.keyManagementServiceStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new keymanagementserviceModule.v1.KeyManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.keyManagementServiceStub, undefined); + await client.initialize(); + assert(client.keyManagementServiceStub); + }); - it('has close method for the initialized client', done => { - const client = new keymanagementserviceModule.v1.KeyManagementServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - assert(client.keyManagementServiceStub); - client.close().then(() => { - done(); + it('has close method for the initialized client', done => { + const client = + new keymanagementserviceModule.v1.KeyManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.keyManagementServiceStub); + client.close().then(() => { + done(); + }); }); - }); - it('has close method for the non-initialized client', done => { - const client = new keymanagementserviceModule.v1.KeyManagementServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.keyManagementServiceStub, undefined); - client.close().then(() => { - done(); + it('has close method for the non-initialized client', done => { + const client = + new keymanagementserviceModule.v1.KeyManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.keyManagementServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new keymanagementserviceModule.v1.KeyManagementServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new keymanagementserviceModule.v1.KeyManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new keymanagementserviceModule.v1.KeyManagementServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new keymanagementserviceModule.v1.KeyManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getKeyRing', () => {