From f4644f2ac7484d51ef33a5cefd0c6a85f9bdc67d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:08:11 +0000 Subject: [PATCH] fix: better support for fallback mode (#150) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- .../v1/applications.create_application.js | 3 + .../v1/applications.get_application.js | 3 + .../v1/applications.repair_application.js | 3 + .../v1/applications.update_application.js | 3 + ...tificates.create_authorized_certificate.js | 3 + ...tificates.delete_authorized_certificate.js | 3 + ...certificates.get_authorized_certificate.js | 3 + ...rtificates.list_authorized_certificates.js | 3 + ...tificates.update_authorized_certificate.js | 3 + ...horized_domains.list_authorized_domains.js | 3 + .../domain_mappings.create_domain_mapping.js | 3 + .../domain_mappings.delete_domain_mapping.js | 3 + .../v1/domain_mappings.get_domain_mapping.js | 3 + .../domain_mappings.list_domain_mappings.js | 3 + .../domain_mappings.update_domain_mapping.js | 3 + .../v1/firewall.batch_update_ingress_rules.js | 3 + .../v1/firewall.create_ingress_rule.js | 3 + .../v1/firewall.delete_ingress_rule.js | 3 + .../generated/v1/firewall.get_ingress_rule.js | 3 + .../v1/firewall.list_ingress_rules.js | 3 + .../v1/firewall.update_ingress_rule.js | 3 + .../generated/v1/instances.debug_instance.js | 3 + .../generated/v1/instances.delete_instance.js | 3 + .../generated/v1/instances.get_instance.js | 3 + .../generated/v1/instances.list_instances.js | 3 + .../generated/v1/services.delete_service.js | 3 + .../generated/v1/services.get_service.js | 3 + .../generated/v1/services.list_services.js | 3 + .../generated/v1/services.update_service.js | 3 + .../snippet_metadata.google.appengine.v1.json | 68 +++---- .../generated/v1/versions.create_version.js | 3 + .../generated/v1/versions.delete_version.js | 3 + .../generated/v1/versions.get_version.js | 3 + .../generated/v1/versions.list_versions.js | 3 + .../generated/v1/versions.update_version.js | 3 + .../src/v1/applications_client.ts | 9 +- .../src/v1/authorized_certificates_client.ts | 8 +- .../src/v1/authorized_domains_client.ts | 8 +- .../src/v1/domain_mappings_client.ts | 14 +- .../src/v1/firewall_client.ts | 8 +- .../src/v1/instances_client.ts | 12 +- .../src/v1/services_client.ts | 12 +- .../src/v1/versions_client.ts | 14 +- .../test/gapic_applications_v1.ts | 160 ++++++++-------- .../test/gapic_authorized_certificates_v1.ts | 180 +++++++++--------- .../test/gapic_authorized_domains_v1.ts | 160 ++++++++-------- .../test/gapic_domain_mappings_v1.ts | 160 ++++++++-------- .../test/gapic_firewall_v1.ts | 156 +++++++-------- .../test/gapic_instances_v1.ts | 156 +++++++-------- .../test/gapic_services_v1.ts | 156 +++++++-------- .../test/gapic_versions_v1.ts | 156 +++++++-------- 51 files changed, 830 insertions(+), 709 deletions(-) diff --git a/packages/google-appengine/samples/generated/v1/applications.create_application.js b/packages/google-appengine/samples/generated/v1/applications.create_application.js index 560f2b12c56..c7bb6c91036 100644 --- a/packages/google-appengine/samples/generated/v1/applications.create_application.js +++ b/packages/google-appengine/samples/generated/v1/applications.create_application.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Applications_CreateApplication_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-appengine/samples/generated/v1/applications.get_application.js b/packages/google-appengine/samples/generated/v1/applications.get_application.js index efb9a92cce8..4af2378080d 100644 --- a/packages/google-appengine/samples/generated/v1/applications.get_application.js +++ b/packages/google-appengine/samples/generated/v1/applications.get_application.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Applications_GetApplication_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-appengine/samples/generated/v1/applications.repair_application.js b/packages/google-appengine/samples/generated/v1/applications.repair_application.js index c24a2c3d45c..7730c2c38e5 100644 --- a/packages/google-appengine/samples/generated/v1/applications.repair_application.js +++ b/packages/google-appengine/samples/generated/v1/applications.repair_application.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Applications_RepairApplication_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-appengine/samples/generated/v1/applications.update_application.js b/packages/google-appengine/samples/generated/v1/applications.update_application.js index 8861092bc6b..48fe715a274 100644 --- a/packages/google-appengine/samples/generated/v1/applications.update_application.js +++ b/packages/google-appengine/samples/generated/v1/applications.update_application.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Applications_UpdateApplication_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-appengine/samples/generated/v1/authorized_certificates.create_authorized_certificate.js b/packages/google-appengine/samples/generated/v1/authorized_certificates.create_authorized_certificate.js index 26b48e9935c..9822c697189 100644 --- a/packages/google-appengine/samples/generated/v1/authorized_certificates.create_authorized_certificate.js +++ b/packages/google-appengine/samples/generated/v1/authorized_certificates.create_authorized_certificate.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_AuthorizedCertificates_CreateAuthorizedCertificate_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-appengine/samples/generated/v1/authorized_certificates.delete_authorized_certificate.js b/packages/google-appengine/samples/generated/v1/authorized_certificates.delete_authorized_certificate.js index 025f0afe5d0..a0be34c5b88 100644 --- a/packages/google-appengine/samples/generated/v1/authorized_certificates.delete_authorized_certificate.js +++ b/packages/google-appengine/samples/generated/v1/authorized_certificates.delete_authorized_certificate.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_AuthorizedCertificates_DeleteAuthorizedCertificate_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-appengine/samples/generated/v1/authorized_certificates.get_authorized_certificate.js b/packages/google-appengine/samples/generated/v1/authorized_certificates.get_authorized_certificate.js index e70dd967ec4..eabbb7486c5 100644 --- a/packages/google-appengine/samples/generated/v1/authorized_certificates.get_authorized_certificate.js +++ b/packages/google-appengine/samples/generated/v1/authorized_certificates.get_authorized_certificate.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_AuthorizedCertificates_GetAuthorizedCertificate_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-appengine/samples/generated/v1/authorized_certificates.list_authorized_certificates.js b/packages/google-appengine/samples/generated/v1/authorized_certificates.list_authorized_certificates.js index 0135281b341..8d5604c1e20 100644 --- a/packages/google-appengine/samples/generated/v1/authorized_certificates.list_authorized_certificates.js +++ b/packages/google-appengine/samples/generated/v1/authorized_certificates.list_authorized_certificates.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_AuthorizedCertificates_ListAuthorizedCertificates_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-appengine/samples/generated/v1/authorized_certificates.update_authorized_certificate.js b/packages/google-appengine/samples/generated/v1/authorized_certificates.update_authorized_certificate.js index 516eed6fac2..6cafe50852d 100644 --- a/packages/google-appengine/samples/generated/v1/authorized_certificates.update_authorized_certificate.js +++ b/packages/google-appengine/samples/generated/v1/authorized_certificates.update_authorized_certificate.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_AuthorizedCertificates_UpdateAuthorizedCertificate_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-appengine/samples/generated/v1/authorized_domains.list_authorized_domains.js b/packages/google-appengine/samples/generated/v1/authorized_domains.list_authorized_domains.js index 4746d772202..1c5bf95f2f7 100644 --- a/packages/google-appengine/samples/generated/v1/authorized_domains.list_authorized_domains.js +++ b/packages/google-appengine/samples/generated/v1/authorized_domains.list_authorized_domains.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_AuthorizedDomains_ListAuthorizedDomains_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-appengine/samples/generated/v1/domain_mappings.create_domain_mapping.js b/packages/google-appengine/samples/generated/v1/domain_mappings.create_domain_mapping.js index da53fa5cf83..f1f5c58b985 100644 --- a/packages/google-appengine/samples/generated/v1/domain_mappings.create_domain_mapping.js +++ b/packages/google-appengine/samples/generated/v1/domain_mappings.create_domain_mapping.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_DomainMappings_CreateDomainMapping_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-appengine/samples/generated/v1/domain_mappings.delete_domain_mapping.js b/packages/google-appengine/samples/generated/v1/domain_mappings.delete_domain_mapping.js index 3202184441a..37e4c3226a5 100644 --- a/packages/google-appengine/samples/generated/v1/domain_mappings.delete_domain_mapping.js +++ b/packages/google-appengine/samples/generated/v1/domain_mappings.delete_domain_mapping.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_DomainMappings_DeleteDomainMapping_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-appengine/samples/generated/v1/domain_mappings.get_domain_mapping.js b/packages/google-appengine/samples/generated/v1/domain_mappings.get_domain_mapping.js index 9bae3ee7c81..dc4797421bb 100644 --- a/packages/google-appengine/samples/generated/v1/domain_mappings.get_domain_mapping.js +++ b/packages/google-appengine/samples/generated/v1/domain_mappings.get_domain_mapping.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_DomainMappings_GetDomainMapping_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-appengine/samples/generated/v1/domain_mappings.list_domain_mappings.js b/packages/google-appengine/samples/generated/v1/domain_mappings.list_domain_mappings.js index da52fa14065..a4b7018ad23 100644 --- a/packages/google-appengine/samples/generated/v1/domain_mappings.list_domain_mappings.js +++ b/packages/google-appengine/samples/generated/v1/domain_mappings.list_domain_mappings.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_DomainMappings_ListDomainMappings_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-appengine/samples/generated/v1/domain_mappings.update_domain_mapping.js b/packages/google-appengine/samples/generated/v1/domain_mappings.update_domain_mapping.js index 8c81ddffe1e..7dab51c3c07 100644 --- a/packages/google-appengine/samples/generated/v1/domain_mappings.update_domain_mapping.js +++ b/packages/google-appengine/samples/generated/v1/domain_mappings.update_domain_mapping.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_DomainMappings_UpdateDomainMapping_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-appengine/samples/generated/v1/firewall.batch_update_ingress_rules.js b/packages/google-appengine/samples/generated/v1/firewall.batch_update_ingress_rules.js index aacadd35608..08b177a511f 100644 --- a/packages/google-appengine/samples/generated/v1/firewall.batch_update_ingress_rules.js +++ b/packages/google-appengine/samples/generated/v1/firewall.batch_update_ingress_rules.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Firewall_BatchUpdateIngressRules_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-appengine/samples/generated/v1/firewall.create_ingress_rule.js b/packages/google-appengine/samples/generated/v1/firewall.create_ingress_rule.js index ae883644c46..e53d90a28f0 100644 --- a/packages/google-appengine/samples/generated/v1/firewall.create_ingress_rule.js +++ b/packages/google-appengine/samples/generated/v1/firewall.create_ingress_rule.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Firewall_CreateIngressRule_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-appengine/samples/generated/v1/firewall.delete_ingress_rule.js b/packages/google-appengine/samples/generated/v1/firewall.delete_ingress_rule.js index 41c484ebf6b..cf3e2079368 100644 --- a/packages/google-appengine/samples/generated/v1/firewall.delete_ingress_rule.js +++ b/packages/google-appengine/samples/generated/v1/firewall.delete_ingress_rule.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Firewall_DeleteIngressRule_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-appengine/samples/generated/v1/firewall.get_ingress_rule.js b/packages/google-appengine/samples/generated/v1/firewall.get_ingress_rule.js index 2312966fa09..dc3f0966416 100644 --- a/packages/google-appengine/samples/generated/v1/firewall.get_ingress_rule.js +++ b/packages/google-appengine/samples/generated/v1/firewall.get_ingress_rule.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Firewall_GetIngressRule_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-appengine/samples/generated/v1/firewall.list_ingress_rules.js b/packages/google-appengine/samples/generated/v1/firewall.list_ingress_rules.js index 03ded8322c9..0cc3a260564 100644 --- a/packages/google-appengine/samples/generated/v1/firewall.list_ingress_rules.js +++ b/packages/google-appengine/samples/generated/v1/firewall.list_ingress_rules.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Firewall_ListIngressRules_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-appengine/samples/generated/v1/firewall.update_ingress_rule.js b/packages/google-appengine/samples/generated/v1/firewall.update_ingress_rule.js index 40bf4aa137b..c371af1eff9 100644 --- a/packages/google-appengine/samples/generated/v1/firewall.update_ingress_rule.js +++ b/packages/google-appengine/samples/generated/v1/firewall.update_ingress_rule.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Firewall_UpdateIngressRule_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-appengine/samples/generated/v1/instances.debug_instance.js b/packages/google-appengine/samples/generated/v1/instances.debug_instance.js index b5c89c7d568..c5652950940 100644 --- a/packages/google-appengine/samples/generated/v1/instances.debug_instance.js +++ b/packages/google-appengine/samples/generated/v1/instances.debug_instance.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Instances_DebugInstance_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-appengine/samples/generated/v1/instances.delete_instance.js b/packages/google-appengine/samples/generated/v1/instances.delete_instance.js index 7568240456b..996c4bb4bbc 100644 --- a/packages/google-appengine/samples/generated/v1/instances.delete_instance.js +++ b/packages/google-appengine/samples/generated/v1/instances.delete_instance.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Instances_DeleteInstance_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-appengine/samples/generated/v1/instances.get_instance.js b/packages/google-appengine/samples/generated/v1/instances.get_instance.js index 8ef3fc96876..261dd293788 100644 --- a/packages/google-appengine/samples/generated/v1/instances.get_instance.js +++ b/packages/google-appengine/samples/generated/v1/instances.get_instance.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Instances_GetInstance_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-appengine/samples/generated/v1/instances.list_instances.js b/packages/google-appengine/samples/generated/v1/instances.list_instances.js index 67bf13ffd1c..0bb072531a0 100644 --- a/packages/google-appengine/samples/generated/v1/instances.list_instances.js +++ b/packages/google-appengine/samples/generated/v1/instances.list_instances.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Instances_ListInstances_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-appengine/samples/generated/v1/services.delete_service.js b/packages/google-appengine/samples/generated/v1/services.delete_service.js index 18e3daae096..2de63604b7e 100644 --- a/packages/google-appengine/samples/generated/v1/services.delete_service.js +++ b/packages/google-appengine/samples/generated/v1/services.delete_service.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Services_DeleteService_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-appengine/samples/generated/v1/services.get_service.js b/packages/google-appengine/samples/generated/v1/services.get_service.js index 1046f1b912c..3d38709f120 100644 --- a/packages/google-appengine/samples/generated/v1/services.get_service.js +++ b/packages/google-appengine/samples/generated/v1/services.get_service.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Services_GetService_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-appengine/samples/generated/v1/services.list_services.js b/packages/google-appengine/samples/generated/v1/services.list_services.js index 044379db7c3..713b0945488 100644 --- a/packages/google-appengine/samples/generated/v1/services.list_services.js +++ b/packages/google-appengine/samples/generated/v1/services.list_services.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Services_ListServices_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-appengine/samples/generated/v1/services.update_service.js b/packages/google-appengine/samples/generated/v1/services.update_service.js index 462db6de3fd..2fe04fd9e13 100644 --- a/packages/google-appengine/samples/generated/v1/services.update_service.js +++ b/packages/google-appengine/samples/generated/v1/services.update_service.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Services_UpdateService_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-appengine/samples/generated/v1/snippet_metadata.google.appengine.v1.json b/packages/google-appengine/samples/generated/v1/snippet_metadata.google.appengine.v1.json index 5857020cc9c..4d34cc9d878 100644 --- a/packages/google-appengine/samples/generated/v1/snippet_metadata.google.appengine.v1.json +++ b/packages/google-appengine/samples/generated/v1/snippet_metadata.google.appengine.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 49, + "end": 52, "type": "FULL" } ], @@ -62,7 +62,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -102,7 +102,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -150,7 +150,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -190,7 +190,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -242,7 +242,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], @@ -286,7 +286,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], @@ -330,7 +330,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -378,7 +378,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -418,7 +418,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -466,7 +466,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -514,7 +514,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -554,7 +554,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -602,7 +602,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -650,7 +650,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -690,7 +690,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -742,7 +742,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], @@ -786,7 +786,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -830,7 +830,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -870,7 +870,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -918,7 +918,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -958,7 +958,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -1006,7 +1006,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -1046,7 +1046,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1086,7 +1086,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -1130,7 +1130,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -1178,7 +1178,7 @@ "segments": [ { "start": 25, - "end": 49, + "end": 52, "type": "FULL" } ], @@ -1218,7 +1218,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -1270,7 +1270,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -1310,7 +1310,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -1362,7 +1362,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], @@ -1406,7 +1406,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -1450,7 +1450,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -1498,7 +1498,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], diff --git a/packages/google-appengine/samples/generated/v1/versions.create_version.js b/packages/google-appengine/samples/generated/v1/versions.create_version.js index d8ba6cd5525..276186c4dc3 100644 --- a/packages/google-appengine/samples/generated/v1/versions.create_version.js +++ b/packages/google-appengine/samples/generated/v1/versions.create_version.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Versions_CreateVersion_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-appengine/samples/generated/v1/versions.delete_version.js b/packages/google-appengine/samples/generated/v1/versions.delete_version.js index 2454be3229f..0222462b369 100644 --- a/packages/google-appengine/samples/generated/v1/versions.delete_version.js +++ b/packages/google-appengine/samples/generated/v1/versions.delete_version.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Versions_DeleteVersion_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-appengine/samples/generated/v1/versions.get_version.js b/packages/google-appengine/samples/generated/v1/versions.get_version.js index ce0428ba7d3..3c3f3b872b2 100644 --- a/packages/google-appengine/samples/generated/v1/versions.get_version.js +++ b/packages/google-appengine/samples/generated/v1/versions.get_version.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Versions_GetVersion_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-appengine/samples/generated/v1/versions.list_versions.js b/packages/google-appengine/samples/generated/v1/versions.list_versions.js index c52b7c0aba0..be939d3057e 100644 --- a/packages/google-appengine/samples/generated/v1/versions.list_versions.js +++ b/packages/google-appengine/samples/generated/v1/versions.list_versions.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Versions_ListVersions_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-appengine/samples/generated/v1/versions.update_version.js b/packages/google-appengine/samples/generated/v1/versions.update_version.js index 29771721cb6..cc89e90abc5 100644 --- a/packages/google-appengine/samples/generated/v1/versions.update_version.js +++ b/packages/google-appengine/samples/generated/v1/versions.update_version.js @@ -23,6 +23,9 @@ function main() { // [START appengine_v1_generated_Versions_UpdateVersion_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-appengine/src/v1/applications_client.ts b/packages/google-appengine/src/v1/applications_client.ts index e133a5cc815..475d8612e4b 100644 --- a/packages/google-appengine/src/v1/applications_client.ts +++ b/packages/google-appengine/src/v1/applications_client.ts @@ -310,7 +310,8 @@ export class ApplicationsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -592,7 +593,7 @@ export class ApplicationsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createApplication, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.appengine.v1.Application, @@ -738,7 +739,7 @@ export class ApplicationsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateApplication, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.appengine.v1.Application, @@ -884,7 +885,7 @@ export class ApplicationsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.repairApplication, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.appengine.v1.Application, diff --git a/packages/google-appengine/src/v1/authorized_certificates_client.ts b/packages/google-appengine/src/v1/authorized_certificates_client.ts index 4ce007fc537..c011f103fba 100644 --- a/packages/google-appengine/src/v1/authorized_certificates_client.ts +++ b/packages/google-appengine/src/v1/authorized_certificates_client.ts @@ -28,7 +28,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'); /** @@ -256,7 +255,8 @@ export class AuthorizedCertificatesClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -883,7 +883,7 @@ export class AuthorizedCertificatesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listAuthorizedCertificates.createStream( - this.innerApiCalls.listAuthorizedCertificates as gax.GaxCall, + this.innerApiCalls.listAuthorizedCertificates as GaxCall, request, callSettings ); @@ -933,7 +933,7 @@ export class AuthorizedCertificatesClient { this.initialize(); return this.descriptors.page.listAuthorizedCertificates.asyncIterate( this.innerApiCalls['listAuthorizedCertificates'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-appengine/src/v1/authorized_domains_client.ts b/packages/google-appengine/src/v1/authorized_domains_client.ts index 4eea17a5dde..26848e8be47 100644 --- a/packages/google-appengine/src/v1/authorized_domains_client.ts +++ b/packages/google-appengine/src/v1/authorized_domains_client.ts @@ -28,7 +28,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'); /** @@ -250,7 +249,8 @@ export class AuthorizedDomainsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -454,7 +454,7 @@ export class AuthorizedDomainsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listAuthorizedDomains.createStream( - this.innerApiCalls.listAuthorizedDomains as gax.GaxCall, + this.innerApiCalls.listAuthorizedDomains as GaxCall, request, callSettings ); @@ -502,7 +502,7 @@ export class AuthorizedDomainsClient { this.initialize(); return this.descriptors.page.listAuthorizedDomains.asyncIterate( this.innerApiCalls['listAuthorizedDomains'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-appengine/src/v1/domain_mappings_client.ts b/packages/google-appengine/src/v1/domain_mappings_client.ts index 79c1b6b4f9c..947f8ab25dc 100644 --- a/packages/google-appengine/src/v1/domain_mappings_client.ts +++ b/packages/google-appengine/src/v1/domain_mappings_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'); /** @@ -329,7 +328,8 @@ export class DomainMappingsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -619,7 +619,7 @@ export class DomainMappingsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createDomainMapping, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.appengine.v1.DomainMapping, @@ -765,7 +765,7 @@ export class DomainMappingsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateDomainMapping, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.appengine.v1.DomainMapping, @@ -905,7 +905,7 @@ export class DomainMappingsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteDomainMapping, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1043,7 +1043,7 @@ export class DomainMappingsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDomainMappings.createStream( - this.innerApiCalls.listDomainMappings as gax.GaxCall, + this.innerApiCalls.listDomainMappings as GaxCall, request, callSettings ); @@ -1091,7 +1091,7 @@ export class DomainMappingsClient { this.initialize(); return this.descriptors.page.listDomainMappings.asyncIterate( this.innerApiCalls['listDomainMappings'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-appengine/src/v1/firewall_client.ts b/packages/google-appengine/src/v1/firewall_client.ts index fee78bb8ddc..17de0ca4020 100644 --- a/packages/google-appengine/src/v1/firewall_client.ts +++ b/packages/google-appengine/src/v1/firewall_client.ts @@ -28,7 +28,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'); /** @@ -264,7 +263,8 @@ export class FirewallClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -931,7 +931,7 @@ export class FirewallClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listIngressRules.createStream( - this.innerApiCalls.listIngressRules as gax.GaxCall, + this.innerApiCalls.listIngressRules as GaxCall, request, callSettings ); @@ -984,7 +984,7 @@ export class FirewallClient { this.initialize(); return this.descriptors.page.listIngressRules.asyncIterate( this.innerApiCalls['listIngressRules'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-appengine/src/v1/instances_client.ts b/packages/google-appengine/src/v1/instances_client.ts index 9cb72c6bb36..58095a4a164 100644 --- a/packages/google-appengine/src/v1/instances_client.ts +++ b/packages/google-appengine/src/v1/instances_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'); /** @@ -317,7 +316,8 @@ export class InstancesClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -610,7 +610,7 @@ export class InstancesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -763,7 +763,7 @@ export class InstancesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.debugInstance, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.appengine.v1.Instance, @@ -904,7 +904,7 @@ export class InstancesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listInstances.createStream( - this.innerApiCalls.listInstances as gax.GaxCall, + this.innerApiCalls.listInstances as GaxCall, request, callSettings ); @@ -953,7 +953,7 @@ export class InstancesClient { this.initialize(); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-appengine/src/v1/services_client.ts b/packages/google-appengine/src/v1/services_client.ts index 991e9f382b7..bfa00bc9403 100644 --- a/packages/google-appengine/src/v1/services_client.ts +++ b/packages/google-appengine/src/v1/services_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'); /** @@ -317,7 +316,8 @@ export class ServicesClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -615,7 +615,7 @@ export class ServicesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateService, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.appengine.v1.Service, @@ -752,7 +752,7 @@ export class ServicesClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteService, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -888,7 +888,7 @@ export class ServicesClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listServices.createStream( - this.innerApiCalls.listServices as gax.GaxCall, + this.innerApiCalls.listServices as GaxCall, request, callSettings ); @@ -936,7 +936,7 @@ export class ServicesClient { this.initialize(); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-appengine/src/v1/versions_client.ts b/packages/google-appengine/src/v1/versions_client.ts index 5e0b54ee998..fffad25504e 100644 --- a/packages/google-appengine/src/v1/versions_client.ts +++ b/packages/google-appengine/src/v1/versions_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'); /** @@ -329,7 +328,8 @@ export class VersionsClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -617,7 +617,7 @@ export class VersionsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createVersion, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.appengine.v1.Version, @@ -795,7 +795,7 @@ export class VersionsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateVersion, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.appengine.v1.Version, @@ -933,7 +933,7 @@ export class VersionsClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteVersion, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1075,7 +1075,7 @@ export class VersionsClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listVersions.createStream( - this.innerApiCalls.listVersions as gax.GaxCall, + this.innerApiCalls.listVersions as GaxCall, request, callSettings ); @@ -1126,7 +1126,7 @@ export class VersionsClient { this.initialize(); return this.descriptors.page.listVersions.asyncIterate( this.innerApiCalls['listVersions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-appengine/test/gapic_applications_v1.ts b/packages/google-appengine/test/gapic_applications_v1.ts index dbb6d938836..8289c933772 100644 --- a/packages/google-appengine/test/gapic_applications_v1.ts +++ b/packages/google-appengine/test/gapic_applications_v1.ts @@ -82,99 +82,101 @@ function stubLongRunningCallWithCallback( } describe('v1.ApplicationsClient', () => { - it('has servicePath', () => { - const servicePath = applicationsModule.v1.ApplicationsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = applicationsModule.v1.ApplicationsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = applicationsModule.v1.ApplicationsClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = applicationsModule.v1.ApplicationsClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new applicationsModule.v1.ApplicationsClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = applicationsModule.v1.ApplicationsClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new applicationsModule.v1.ApplicationsClient({ - fallback: true, + it('has port', () => { + const port = applicationsModule.v1.ApplicationsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new applicationsModule.v1.ApplicationsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new applicationsModule.v1.ApplicationsClient(); + assert(client); }); - assert.strictEqual(client.applicationsStub, undefined); - await client.initialize(); - assert(client.applicationsStub); - }); - it('has close method for the initialized client', done => { - const client = new applicationsModule.v1.ApplicationsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new applicationsModule.v1.ApplicationsClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.applicationsStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new applicationsModule.v1.ApplicationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.applicationsStub, undefined); + await client.initialize(); + assert(client.applicationsStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new applicationsModule.v1.ApplicationsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new applicationsModule.v1.ApplicationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.applicationsStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.applicationsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new applicationsModule.v1.ApplicationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.applicationsStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new applicationsModule.v1.ApplicationsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new applicationsModule.v1.ApplicationsClient({ + 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().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 applicationsModule.v1.ApplicationsClient({ - 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); + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new applicationsModule.v1.ApplicationsClient({ + 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); + }); }); describe('getApplication', () => { diff --git a/packages/google-appengine/test/gapic_authorized_certificates_v1.ts b/packages/google-appengine/test/gapic_authorized_certificates_v1.ts index f45e37c1fe7..bb640ad456a 100644 --- a/packages/google-appengine/test/gapic_authorized_certificates_v1.ts +++ b/packages/google-appengine/test/gapic_authorized_certificates_v1.ts @@ -113,109 +113,113 @@ function stubAsyncIterationCall( } describe('v1.AuthorizedCertificatesClient', () => { - it('has servicePath', () => { - const servicePath = - authorizedcertificatesModule.v1.AuthorizedCertificatesClient.servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + authorizedcertificatesModule.v1.AuthorizedCertificatesClient + .servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - authorizedcertificatesModule.v1.AuthorizedCertificatesClient.apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + authorizedcertificatesModule.v1.AuthorizedCertificatesClient + .apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = - authorizedcertificatesModule.v1.AuthorizedCertificatesClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + authorizedcertificatesModule.v1.AuthorizedCertificatesClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new authorizedcertificatesModule.v1.AuthorizedCertificatesClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new authorizedcertificatesModule.v1.AuthorizedCertificatesClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = - new authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ - fallback: true, - }); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = - new authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.authorizedCertificatesStub, undefined); - await client.initialize(); - assert(client.authorizedCertificatesStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.authorizedCertificatesStub, undefined); + await client.initialize(); + assert(client.authorizedCertificatesStub); + }); - it('has close method for the initialized client', done => { - const client = - new authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = + new authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.authorizedCertificatesStub); + client.close().then(() => { + done(); }); - client.initialize(); - assert(client.authorizedCertificatesStub); - client.close().then(() => { - done(); }); - }); - it('has close method for the non-initialized client', done => { - const client = - new authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = + new authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.authorizedCertificatesStub, undefined); + client.close().then(() => { + done(); }); - assert.strictEqual(client.authorizedCertificatesStub, undefined); - client.close().then(() => { - done(); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ - 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 authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ + 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 authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ - 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 authorizedcertificatesModule.v1.AuthorizedCertificatesClient({ + 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('getAuthorizedCertificate', () => { diff --git a/packages/google-appengine/test/gapic_authorized_domains_v1.ts b/packages/google-appengine/test/gapic_authorized_domains_v1.ts index e480b0cd501..7489adce631 100644 --- a/packages/google-appengine/test/gapic_authorized_domains_v1.ts +++ b/packages/google-appengine/test/gapic_authorized_domains_v1.ts @@ -113,101 +113,103 @@ function stubAsyncIterationCall( } describe('v1.AuthorizedDomainsClient', () => { - it('has servicePath', () => { - const servicePath = - authorizeddomainsModule.v1.AuthorizedDomainsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - authorizeddomainsModule.v1.AuthorizedDomainsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = authorizeddomainsModule.v1.AuthorizedDomainsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + authorizeddomainsModule.v1.AuthorizedDomainsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + authorizeddomainsModule.v1.AuthorizedDomainsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = authorizeddomainsModule.v1.AuthorizedDomainsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.authorizedDomainsStub, undefined); - await client.initialize(); - assert(client.authorizedDomainsStub); - }); - it('has close method for the initialized client', done => { - const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient(); + assert(client); }); - client.initialize(); - assert(client.authorizedDomainsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.authorizedDomainsStub, undefined); + await client.initialize(); + assert(client.authorizedDomainsStub); }); - assert.strictEqual(client.authorizedDomainsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.authorizedDomainsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.authorizedDomainsStub, 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 authorizeddomainsModule.v1.AuthorizedDomainsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new authorizeddomainsModule.v1.AuthorizedDomainsClient({ + 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 authorizeddomainsModule.v1.AuthorizedDomainsClient({ + 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('listAuthorizedDomains', () => { diff --git a/packages/google-appengine/test/gapic_domain_mappings_v1.ts b/packages/google-appengine/test/gapic_domain_mappings_v1.ts index 913929fc832..ed9294c4a45 100644 --- a/packages/google-appengine/test/gapic_domain_mappings_v1.ts +++ b/packages/google-appengine/test/gapic_domain_mappings_v1.ts @@ -145,101 +145,103 @@ function stubAsyncIterationCall( } describe('v1.DomainMappingsClient', () => { - it('has servicePath', () => { - const servicePath = - domainmappingsModule.v1.DomainMappingsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - domainmappingsModule.v1.DomainMappingsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = domainmappingsModule.v1.DomainMappingsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new domainmappingsModule.v1.DomainMappingsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + domainmappingsModule.v1.DomainMappingsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new domainmappingsModule.v1.DomainMappingsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + domainmappingsModule.v1.DomainMappingsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new domainmappingsModule.v1.DomainMappingsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = domainmappingsModule.v1.DomainMappingsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.domainMappingsStub, undefined); - await client.initialize(); - assert(client.domainMappingsStub); - }); - it('has close method for the initialized client', done => { - const client = new domainmappingsModule.v1.DomainMappingsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new domainmappingsModule.v1.DomainMappingsClient(); + assert(client); }); - client.initialize(); - assert(client.domainMappingsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new domainmappingsModule.v1.DomainMappingsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new domainmappingsModule.v1.DomainMappingsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new domainmappingsModule.v1.DomainMappingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.domainMappingsStub, undefined); + await client.initialize(); + assert(client.domainMappingsStub); }); - assert.strictEqual(client.domainMappingsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new domainmappingsModule.v1.DomainMappingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.domainMappingsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new domainmappingsModule.v1.DomainMappingsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new domainmappingsModule.v1.DomainMappingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.domainMappingsStub, 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 domainmappingsModule.v1.DomainMappingsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new domainmappingsModule.v1.DomainMappingsClient({ + 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 domainmappingsModule.v1.DomainMappingsClient({ + 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('getDomainMapping', () => { diff --git a/packages/google-appengine/test/gapic_firewall_v1.ts b/packages/google-appengine/test/gapic_firewall_v1.ts index 1c45e6d6c1e..1289618fe1d 100644 --- a/packages/google-appengine/test/gapic_firewall_v1.ts +++ b/packages/google-appengine/test/gapic_firewall_v1.ts @@ -113,99 +113,101 @@ function stubAsyncIterationCall( } describe('v1.FirewallClient', () => { - it('has servicePath', () => { - const servicePath = firewallModule.v1.FirewallClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = firewallModule.v1.FirewallClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = firewallModule.v1.FirewallClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new firewallModule.v1.FirewallClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = firewallModule.v1.FirewallClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new firewallModule.v1.FirewallClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = firewallModule.v1.FirewallClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new firewallModule.v1.FirewallClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = firewallModule.v1.FirewallClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.firewallStub, undefined); - await client.initialize(); - assert(client.firewallStub); - }); - it('has close method for the initialized client', done => { - const client = new firewallModule.v1.FirewallClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new firewallModule.v1.FirewallClient(); + assert(client); }); - client.initialize(); - assert(client.firewallStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new firewallModule.v1.FirewallClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new firewallModule.v1.FirewallClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new firewallModule.v1.FirewallClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.firewallStub, undefined); + await client.initialize(); + assert(client.firewallStub); }); - assert.strictEqual(client.firewallStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new firewallModule.v1.FirewallClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.firewallStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new firewallModule.v1.FirewallClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new firewallModule.v1.FirewallClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.firewallStub, 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 firewallModule.v1.FirewallClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new firewallModule.v1.FirewallClient({ + 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 firewallModule.v1.FirewallClient({ + 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('batchUpdateIngressRules', () => { diff --git a/packages/google-appengine/test/gapic_instances_v1.ts b/packages/google-appengine/test/gapic_instances_v1.ts index f9a37550259..7f2f0a49dbc 100644 --- a/packages/google-appengine/test/gapic_instances_v1.ts +++ b/packages/google-appengine/test/gapic_instances_v1.ts @@ -145,99 +145,101 @@ function stubAsyncIterationCall( } describe('v1.InstancesClient', () => { - it('has servicePath', () => { - const servicePath = instancesModule.v1.InstancesClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = instancesModule.v1.InstancesClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = instancesModule.v1.InstancesClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new instancesModule.v1.InstancesClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = instancesModule.v1.InstancesClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new instancesModule.v1.InstancesClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = instancesModule.v1.InstancesClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new instancesModule.v1.InstancesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = instancesModule.v1.InstancesClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.instancesStub, undefined); - await client.initialize(); - assert(client.instancesStub); - }); - it('has close method for the initialized client', done => { - const client = new instancesModule.v1.InstancesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new instancesModule.v1.InstancesClient(); + assert(client); }); - client.initialize(); - assert(client.instancesStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new instancesModule.v1.InstancesClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new instancesModule.v1.InstancesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new instancesModule.v1.InstancesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.instancesStub, undefined); + await client.initialize(); + assert(client.instancesStub); }); - assert.strictEqual(client.instancesStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new instancesModule.v1.InstancesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.instancesStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new instancesModule.v1.InstancesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new instancesModule.v1.InstancesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.instancesStub, 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 instancesModule.v1.InstancesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new instancesModule.v1.InstancesClient({ + 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 instancesModule.v1.InstancesClient({ + 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('getInstance', () => { diff --git a/packages/google-appengine/test/gapic_services_v1.ts b/packages/google-appengine/test/gapic_services_v1.ts index 7cd69f4b802..d114475a774 100644 --- a/packages/google-appengine/test/gapic_services_v1.ts +++ b/packages/google-appengine/test/gapic_services_v1.ts @@ -145,99 +145,101 @@ function stubAsyncIterationCall( } describe('v1.ServicesClient', () => { - it('has servicePath', () => { - const servicePath = servicesModule.v1.ServicesClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = servicesModule.v1.ServicesClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = servicesModule.v1.ServicesClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new servicesModule.v1.ServicesClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = servicesModule.v1.ServicesClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new servicesModule.v1.ServicesClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = servicesModule.v1.ServicesClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new servicesModule.v1.ServicesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = servicesModule.v1.ServicesClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.servicesStub, undefined); - await client.initialize(); - assert(client.servicesStub); - }); - it('has close method for the initialized client', done => { - const client = new servicesModule.v1.ServicesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new servicesModule.v1.ServicesClient(); + assert(client); }); - client.initialize(); - assert(client.servicesStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new servicesModule.v1.ServicesClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new servicesModule.v1.ServicesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new servicesModule.v1.ServicesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.servicesStub, undefined); + await client.initialize(); + assert(client.servicesStub); }); - assert.strictEqual(client.servicesStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new servicesModule.v1.ServicesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.servicesStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new servicesModule.v1.ServicesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new servicesModule.v1.ServicesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.servicesStub, 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 servicesModule.v1.ServicesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new servicesModule.v1.ServicesClient({ + 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 servicesModule.v1.ServicesClient({ + 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('getService', () => { diff --git a/packages/google-appengine/test/gapic_versions_v1.ts b/packages/google-appengine/test/gapic_versions_v1.ts index 2b3029f9517..4b56ee71330 100644 --- a/packages/google-appengine/test/gapic_versions_v1.ts +++ b/packages/google-appengine/test/gapic_versions_v1.ts @@ -145,99 +145,101 @@ function stubAsyncIterationCall( } describe('v1.VersionsClient', () => { - it('has servicePath', () => { - const servicePath = versionsModule.v1.VersionsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = versionsModule.v1.VersionsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = versionsModule.v1.VersionsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new versionsModule.v1.VersionsClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = versionsModule.v1.VersionsClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new versionsModule.v1.VersionsClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = versionsModule.v1.VersionsClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new versionsModule.v1.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = versionsModule.v1.VersionsClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.versionsStub, undefined); - await client.initialize(); - assert(client.versionsStub); - }); - it('has close method for the initialized client', done => { - const client = new versionsModule.v1.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new versionsModule.v1.VersionsClient(); + assert(client); }); - client.initialize(); - assert(client.versionsStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new versionsModule.v1.VersionsClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new versionsModule.v1.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new versionsModule.v1.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.versionsStub, undefined); + await client.initialize(); + assert(client.versionsStub); }); - assert.strictEqual(client.versionsStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new versionsModule.v1.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.versionsStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new versionsModule.v1.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new versionsModule.v1.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.versionsStub, 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 versionsModule.v1.VersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new versionsModule.v1.VersionsClient({ + 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 versionsModule.v1.VersionsClient({ + 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('getVersion', () => {