From 649fb043d9c0f9e613cb65c1a5b50c2151ccd353 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:23 +0000 Subject: [PATCH] fix: better support for fallback mode (#105) - [ ] 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/service_usage.batch_enable_services.js | 3 + .../v1/service_usage.batch_get_services.js | 3 + .../v1/service_usage.disable_service.js | 3 + .../v1/service_usage.enable_service.js | 3 + .../generated/v1/service_usage.get_service.js | 3 + .../v1/service_usage.list_services.js | 3 + ...t_metadata.google.api.serviceusage.v1.json | 12 +- .../service_usage.batch_enable_services.js | 3 + .../service_usage.create_admin_override.js | 3 + .../service_usage.create_consumer_override.js | 3 + .../service_usage.delete_admin_override.js | 3 + .../service_usage.delete_consumer_override.js | 3 + .../v1beta1/service_usage.disable_service.js | 3 + .../v1beta1/service_usage.enable_service.js | 3 + ...service_usage.generate_service_identity.js | 3 + .../service_usage.get_consumer_quota_limit.js | 3 + ...service_usage.get_consumer_quota_metric.js | 3 + .../v1beta1/service_usage.get_service.js | 3 + .../service_usage.import_admin_overrides.js | 3 + ...service_usage.import_consumer_overrides.js | 3 + .../service_usage.list_admin_overrides.js | 3 + .../service_usage.list_consumer_overrides.js | 3 + ...rvice_usage.list_consumer_quota_metrics.js | 3 + .../v1beta1/service_usage.list_services.js | 3 + .../service_usage.update_admin_override.js | 3 + .../service_usage.update_consumer_override.js | 3 + ...adata.google.api.serviceusage.v1beta1.json | 38 ++--- .../src/v1/service_usage_client.ts | 14 +- .../src/v1beta1/service_usage_client.ts | 44 ++--- .../test/gapic_service_usage_v1.ts | 156 ++++++++--------- .../test/gapic_service_usage_v1beta1.ts | 160 +++++++++--------- 31 files changed, 289 insertions(+), 210 deletions(-) diff --git a/packages/google-api-serviceusage/samples/generated/v1/service_usage.batch_enable_services.js b/packages/google-api-serviceusage/samples/generated/v1/service_usage.batch_enable_services.js index d2b1bf7f00d..be12adf0059 100644 --- a/packages/google-api-serviceusage/samples/generated/v1/service_usage.batch_enable_services.js +++ b/packages/google-api-serviceusage/samples/generated/v1/service_usage.batch_enable_services.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1_generated_ServiceUsage_BatchEnableServices_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-api-serviceusage/samples/generated/v1/service_usage.batch_get_services.js b/packages/google-api-serviceusage/samples/generated/v1/service_usage.batch_get_services.js index 57becf564f4..fcf2cfec241 100644 --- a/packages/google-api-serviceusage/samples/generated/v1/service_usage.batch_get_services.js +++ b/packages/google-api-serviceusage/samples/generated/v1/service_usage.batch_get_services.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1_generated_ServiceUsage_BatchGetServices_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-api-serviceusage/samples/generated/v1/service_usage.disable_service.js b/packages/google-api-serviceusage/samples/generated/v1/service_usage.disable_service.js index fdf61cb1f2c..bef120caef2 100644 --- a/packages/google-api-serviceusage/samples/generated/v1/service_usage.disable_service.js +++ b/packages/google-api-serviceusage/samples/generated/v1/service_usage.disable_service.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1_generated_ServiceUsage_DisableService_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-api-serviceusage/samples/generated/v1/service_usage.enable_service.js b/packages/google-api-serviceusage/samples/generated/v1/service_usage.enable_service.js index 42612040c23..de5d1202fbb 100644 --- a/packages/google-api-serviceusage/samples/generated/v1/service_usage.enable_service.js +++ b/packages/google-api-serviceusage/samples/generated/v1/service_usage.enable_service.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1_generated_ServiceUsage_EnableService_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-api-serviceusage/samples/generated/v1/service_usage.get_service.js b/packages/google-api-serviceusage/samples/generated/v1/service_usage.get_service.js index 5e00009344a..2108e2fff16 100644 --- a/packages/google-api-serviceusage/samples/generated/v1/service_usage.get_service.js +++ b/packages/google-api-serviceusage/samples/generated/v1/service_usage.get_service.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1_generated_ServiceUsage_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-api-serviceusage/samples/generated/v1/service_usage.list_services.js b/packages/google-api-serviceusage/samples/generated/v1/service_usage.list_services.js index bf79c1f09e7..df16e7dee0f 100644 --- a/packages/google-api-serviceusage/samples/generated/v1/service_usage.list_services.js +++ b/packages/google-api-serviceusage/samples/generated/v1/service_usage.list_services.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1_generated_ServiceUsage_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-api-serviceusage/samples/generated/v1/snippet_metadata.google.api.serviceusage.v1.json b/packages/google-api-serviceusage/samples/generated/v1/snippet_metadata.google.api.serviceusage.v1.json index a92ec1d258e..f59aad2f59d 100644 --- a/packages/google-api-serviceusage/samples/generated/v1/snippet_metadata.google.api.serviceusage.v1.json +++ b/packages/google-api-serviceusage/samples/generated/v1/snippet_metadata.google.api.serviceusage.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -62,7 +62,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -110,7 +110,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -150,7 +150,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -202,7 +202,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -246,7 +246,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], diff --git a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.batch_enable_services.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.batch_enable_services.js index 97e9fd7f53b..768c7d4110a 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.batch_enable_services.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.batch_enable_services.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_BatchEnableServices_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-api-serviceusage/samples/generated/v1beta1/service_usage.create_admin_override.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.create_admin_override.js index b7b151b9747..ca18bd904db 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.create_admin_override.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.create_admin_override.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_CreateAdminOverride_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-api-serviceusage/samples/generated/v1beta1/service_usage.create_consumer_override.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.create_consumer_override.js index 15fe75f7edf..af813b0cfa4 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.create_consumer_override.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.create_consumer_override.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_CreateConsumerOverride_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-api-serviceusage/samples/generated/v1beta1/service_usage.delete_admin_override.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.delete_admin_override.js index e7cd43fc3e6..4276f6dbcba 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.delete_admin_override.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.delete_admin_override.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_DeleteAdminOverride_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-api-serviceusage/samples/generated/v1beta1/service_usage.delete_consumer_override.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.delete_consumer_override.js index a3db55eff07..24a32b36a95 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.delete_consumer_override.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.delete_consumer_override.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_DeleteConsumerOverride_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-api-serviceusage/samples/generated/v1beta1/service_usage.disable_service.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.disable_service.js index 1e2d49d6b6c..0361172935d 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.disable_service.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.disable_service.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_DisableService_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-api-serviceusage/samples/generated/v1beta1/service_usage.enable_service.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.enable_service.js index 3c13a43b1bb..bd49e457783 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.enable_service.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.enable_service.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_EnableService_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-api-serviceusage/samples/generated/v1beta1/service_usage.generate_service_identity.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.generate_service_identity.js index 036d417ca19..67825211638 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.generate_service_identity.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.generate_service_identity.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_GenerateServiceIdentity_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-api-serviceusage/samples/generated/v1beta1/service_usage.get_consumer_quota_limit.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.get_consumer_quota_limit.js index 10f89aeafce..b183ea3c5cc 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.get_consumer_quota_limit.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.get_consumer_quota_limit.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_GetConsumerQuotaLimit_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-api-serviceusage/samples/generated/v1beta1/service_usage.get_consumer_quota_metric.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.get_consumer_quota_metric.js index b01636609a6..3f8ac53d60d 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.get_consumer_quota_metric.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.get_consumer_quota_metric.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_GetConsumerQuotaMetric_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-api-serviceusage/samples/generated/v1beta1/service_usage.get_service.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.get_service.js index c296f710b4b..d9d0b62b56a 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.get_service.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.get_service.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_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-api-serviceusage/samples/generated/v1beta1/service_usage.import_admin_overrides.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.import_admin_overrides.js index 0781c153f7d..044df910717 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.import_admin_overrides.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.import_admin_overrides.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_ImportAdminOverrides_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-api-serviceusage/samples/generated/v1beta1/service_usage.import_consumer_overrides.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.import_consumer_overrides.js index 7b833a4dcab..4c04d4efffb 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.import_consumer_overrides.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.import_consumer_overrides.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_ImportConsumerOverrides_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-api-serviceusage/samples/generated/v1beta1/service_usage.list_admin_overrides.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_admin_overrides.js index 663b71ee2c7..5cb7e5b16e2 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_admin_overrides.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_admin_overrides.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_ListAdminOverrides_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-api-serviceusage/samples/generated/v1beta1/service_usage.list_consumer_overrides.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_consumer_overrides.js index 12381668673..766568f83e7 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_consumer_overrides.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_consumer_overrides.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_ListConsumerOverrides_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-api-serviceusage/samples/generated/v1beta1/service_usage.list_consumer_quota_metrics.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_consumer_quota_metrics.js index fb53e5ee005..a162dcb9ef7 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_consumer_quota_metrics.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_consumer_quota_metrics.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_ListConsumerQuotaMetrics_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-api-serviceusage/samples/generated/v1beta1/service_usage.list_services.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_services.js index f3b218d8401..f1d6554b3af 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_services.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.list_services.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_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-api-serviceusage/samples/generated/v1beta1/service_usage.update_admin_override.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.update_admin_override.js index c9d776dd451..827986a5a30 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.update_admin_override.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.update_admin_override.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_UpdateAdminOverride_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-api-serviceusage/samples/generated/v1beta1/service_usage.update_consumer_override.js b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.update_consumer_override.js index 9d359401a2c..d600feaa296 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.update_consumer_override.js +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/service_usage.update_consumer_override.js @@ -23,6 +23,9 @@ function main() { // [START serviceusage_v1beta1_generated_ServiceUsage_UpdateConsumerOverride_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-api-serviceusage/samples/generated/v1beta1/snippet_metadata.google.api.serviceusage.v1beta1.json b/packages/google-api-serviceusage/samples/generated/v1beta1/snippet_metadata.google.api.serviceusage.v1beta1.json index c9596944a91..2bf7a0fd3c0 100644 --- a/packages/google-api-serviceusage/samples/generated/v1beta1/snippet_metadata.google.api.serviceusage.v1beta1.json +++ b/packages/google-api-serviceusage/samples/generated/v1beta1/snippet_metadata.google.api.serviceusage.v1beta1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -62,7 +62,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], @@ -102,7 +102,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -142,7 +142,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -194,7 +194,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -238,7 +238,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -290,7 +290,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -334,7 +334,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -378,7 +378,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -430,7 +430,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 78, "type": "FULL" } ], @@ -486,7 +486,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -534,7 +534,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -582,7 +582,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -634,7 +634,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -686,7 +686,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 78, "type": "FULL" } ], @@ -742,7 +742,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -790,7 +790,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -838,7 +838,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -890,7 +890,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], diff --git a/packages/google-api-serviceusage/src/v1/service_usage_client.ts b/packages/google-api-serviceusage/src/v1/service_usage_client.ts index 91a4cb6f452..e4766bd675c 100644 --- a/packages/google-api-serviceusage/src/v1/service_usage_client.ts +++ b/packages/google-api-serviceusage/src/v1/service_usage_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'); /** @@ -316,7 +315,8 @@ export class ServiceUsageClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -715,7 +715,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.enableService, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.serviceusage.v1.EnableServiceResponse, @@ -872,7 +872,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.disableService, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.serviceusage.v1.DisableServiceResponse, @@ -1028,7 +1028,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.batchEnableServices, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.serviceusage.v1.BatchEnableServicesResponse, @@ -1202,7 +1202,7 @@ export class ServiceUsageClient { 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 ); @@ -1259,7 +1259,7 @@ export class ServiceUsageClient { 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-api-serviceusage/src/v1beta1/service_usage_client.ts b/packages/google-api-serviceusage/src/v1beta1/service_usage_client.ts index 091e490a47a..29d37de16e1 100644 --- a/packages/google-api-serviceusage/src/v1beta1/service_usage_client.ts +++ b/packages/google-api-serviceusage/src/v1beta1/service_usage_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'); /** @@ -459,7 +458,8 @@ export class ServiceUsageClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -989,7 +989,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.enableService, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1152,7 +1152,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.disableService, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1326,7 +1326,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.batchEnableServices, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1483,7 +1483,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createAdminOverride, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.serviceusage.v1beta1.QuotaOverride, @@ -1638,7 +1638,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateAdminOverride, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.serviceusage.v1beta1.QuotaOverride, @@ -1787,7 +1787,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteAdminOverride, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1940,7 +1940,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.importAdminOverrides, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.serviceusage.v1beta1.ImportAdminOverridesResponse, @@ -2100,7 +2100,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createConsumerOverride, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.serviceusage.v1beta1.QuotaOverride, @@ -2259,7 +2259,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateConsumerOverride, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.serviceusage.v1beta1.QuotaOverride, @@ -2412,7 +2412,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteConsumerOverride, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -2569,7 +2569,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.importConsumerOverrides, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.serviceusage.v1beta1.ImportConsumerOverridesResponse, @@ -2716,7 +2716,7 @@ export class ServiceUsageClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.generateServiceIdentity, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.api.serviceusage.v1beta1.ServiceIdentity, @@ -2898,7 +2898,7 @@ export class ServiceUsageClient { 'DeprecationWarning' ); return this.descriptors.page.listServices.createStream( - this.innerApiCalls.listServices as gax.GaxCall, + this.innerApiCalls.listServices as GaxCall, request, callSettings ); @@ -2962,7 +2962,7 @@ export class ServiceUsageClient { ); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3127,7 +3127,7 @@ export class ServiceUsageClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listConsumerQuotaMetrics.createStream( - this.innerApiCalls.listConsumerQuotaMetrics as gax.GaxCall, + this.innerApiCalls.listConsumerQuotaMetrics as GaxCall, request, callSettings ); @@ -3183,7 +3183,7 @@ export class ServiceUsageClient { this.initialize(); return this.descriptors.page.listConsumerQuotaMetrics.asyncIterate( this.innerApiCalls['listConsumerQuotaMetrics'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3334,7 +3334,7 @@ export class ServiceUsageClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listAdminOverrides.createStream( - this.innerApiCalls.listAdminOverrides as gax.GaxCall, + this.innerApiCalls.listAdminOverrides as GaxCall, request, callSettings ); @@ -3387,7 +3387,7 @@ export class ServiceUsageClient { this.initialize(); return this.descriptors.page.listAdminOverrides.asyncIterate( this.innerApiCalls['listAdminOverrides'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3538,7 +3538,7 @@ export class ServiceUsageClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listConsumerOverrides.createStream( - this.innerApiCalls.listConsumerOverrides as gax.GaxCall, + this.innerApiCalls.listConsumerOverrides as GaxCall, request, callSettings ); @@ -3591,7 +3591,7 @@ export class ServiceUsageClient { this.initialize(); return this.descriptors.page.listConsumerOverrides.asyncIterate( this.innerApiCalls['listConsumerOverrides'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-api-serviceusage/test/gapic_service_usage_v1.ts b/packages/google-api-serviceusage/test/gapic_service_usage_v1.ts index 3a028e018a4..6b3d38ca029 100644 --- a/packages/google-api-serviceusage/test/gapic_service_usage_v1.ts +++ b/packages/google-api-serviceusage/test/gapic_service_usage_v1.ts @@ -145,99 +145,101 @@ function stubAsyncIterationCall( } describe('v1.ServiceUsageClient', () => { - it('has servicePath', () => { - const servicePath = serviceusageModule.v1.ServiceUsageClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = serviceusageModule.v1.ServiceUsageClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = serviceusageModule.v1.ServiceUsageClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new serviceusageModule.v1.ServiceUsageClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = serviceusageModule.v1.ServiceUsageClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new serviceusageModule.v1.ServiceUsageClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = serviceusageModule.v1.ServiceUsageClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new serviceusageModule.v1.ServiceUsageClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = serviceusageModule.v1.ServiceUsageClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.serviceUsageStub, undefined); - await client.initialize(); - assert(client.serviceUsageStub); - }); - it('has close method for the initialized client', done => { - const client = new serviceusageModule.v1.ServiceUsageClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new serviceusageModule.v1.ServiceUsageClient(); + assert(client); }); - client.initialize(); - assert(client.serviceUsageStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new serviceusageModule.v1.ServiceUsageClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new serviceusageModule.v1.ServiceUsageClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new serviceusageModule.v1.ServiceUsageClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.serviceUsageStub, undefined); + await client.initialize(); + assert(client.serviceUsageStub); }); - assert.strictEqual(client.serviceUsageStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new serviceusageModule.v1.ServiceUsageClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.serviceUsageStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new serviceusageModule.v1.ServiceUsageClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new serviceusageModule.v1.ServiceUsageClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.serviceUsageStub, 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 serviceusageModule.v1.ServiceUsageClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new serviceusageModule.v1.ServiceUsageClient({ + 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 serviceusageModule.v1.ServiceUsageClient({ + 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-api-serviceusage/test/gapic_service_usage_v1beta1.ts b/packages/google-api-serviceusage/test/gapic_service_usage_v1beta1.ts index dfc4627ed48..c5fd975997b 100644 --- a/packages/google-api-serviceusage/test/gapic_service_usage_v1beta1.ts +++ b/packages/google-api-serviceusage/test/gapic_service_usage_v1beta1.ts @@ -145,101 +145,103 @@ function stubAsyncIterationCall( } describe('v1beta1.ServiceUsageClient', () => { - it('has servicePath', () => { - const servicePath = - serviceusageModule.v1beta1.ServiceUsageClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - serviceusageModule.v1beta1.ServiceUsageClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = serviceusageModule.v1beta1.ServiceUsageClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new serviceusageModule.v1beta1.ServiceUsageClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + serviceusageModule.v1beta1.ServiceUsageClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new serviceusageModule.v1beta1.ServiceUsageClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + serviceusageModule.v1beta1.ServiceUsageClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new serviceusageModule.v1beta1.ServiceUsageClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = serviceusageModule.v1beta1.ServiceUsageClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.serviceUsageStub, undefined); - await client.initialize(); - assert(client.serviceUsageStub); - }); - it('has close method for the initialized client', done => { - const client = new serviceusageModule.v1beta1.ServiceUsageClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new serviceusageModule.v1beta1.ServiceUsageClient(); + assert(client); }); - client.initialize(); - assert(client.serviceUsageStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new serviceusageModule.v1beta1.ServiceUsageClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new serviceusageModule.v1beta1.ServiceUsageClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new serviceusageModule.v1beta1.ServiceUsageClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.serviceUsageStub, undefined); + await client.initialize(); + assert(client.serviceUsageStub); }); - assert.strictEqual(client.serviceUsageStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new serviceusageModule.v1beta1.ServiceUsageClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.serviceUsageStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new serviceusageModule.v1beta1.ServiceUsageClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new serviceusageModule.v1beta1.ServiceUsageClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.serviceUsageStub, 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 serviceusageModule.v1beta1.ServiceUsageClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new serviceusageModule.v1beta1.ServiceUsageClient({ + 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 serviceusageModule.v1beta1.ServiceUsageClient({ + 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', () => {