From 0a9b78e3f988c4f3cd5ca48f97cc2e7680397b82 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:16:15 +0000 Subject: [PATCH] fix: better support for fallback mode (#23) - [ ] 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 --- ...tadata.google.cloud.video.stitcher.v1.json | 40 ++-- .../video_stitcher_service.create_cdn_key.js | 3 + ...eo_stitcher_service.create_live_session.js | 3 + .../v1/video_stitcher_service.create_slate.js | 3 + ...deo_stitcher_service.create_vod_session.js | 3 + .../video_stitcher_service.delete_cdn_key.js | 3 + .../v1/video_stitcher_service.delete_slate.js | 3 + .../v1/video_stitcher_service.get_cdn_key.js | 3 + ...stitcher_service.get_live_ad_tag_detail.js | 3 + ...video_stitcher_service.get_live_session.js | 3 + .../v1/video_stitcher_service.get_slate.js | 3 + ..._stitcher_service.get_vod_ad_tag_detail.js | 3 + .../video_stitcher_service.get_vod_session.js | 3 + ..._stitcher_service.get_vod_stitch_detail.js | 3 + .../video_stitcher_service.list_cdn_keys.js | 3 + ...itcher_service.list_live_ad_tag_details.js | 3 + .../v1/video_stitcher_service.list_slates.js | 3 + ...titcher_service.list_vod_ad_tag_details.js | 3 + ...titcher_service.list_vod_stitch_details.js | 3 + .../video_stitcher_service.update_cdn_key.js | 3 + .../v1/video_stitcher_service.update_slate.js | 3 + .../src/v1/video_stitcher_service_client.ts | 24 +-- .../test/gapic_video_stitcher_service_v1.ts | 187 +++++++++--------- 23 files changed, 184 insertions(+), 127 deletions(-) diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json b/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json index f80ab334a4b..e7ace834035 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -70,7 +70,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -126,7 +126,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -166,7 +166,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -206,7 +206,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -250,7 +250,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -294,7 +294,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -334,7 +334,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -382,7 +382,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -422,7 +422,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -470,7 +470,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -510,7 +510,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -558,7 +558,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -598,7 +598,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -646,7 +646,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -702,7 +702,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -742,7 +742,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -786,7 +786,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -826,7 +826,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -870,7 +870,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js index 81f1770a0f8..0f04829cd4a 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js @@ -23,6 +23,9 @@ function main(parent, cdnKey, cdnKeyId) { // [START videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js index c1d7628dfe0..e1328d4b0b5 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js @@ -23,6 +23,9 @@ function main(parent, liveSession) { // [START videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js index 21d6abd7d23..2913b36a683 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js @@ -23,6 +23,9 @@ function main(parent, slateId, slate) { // [START videostitcher_v1_generated_VideoStitcherService_CreateSlate_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js index 1706cf70964..e5d42ead0bb 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js @@ -23,6 +23,9 @@ function main(parent, vodSession) { // [START videostitcher_v1_generated_VideoStitcherService_CreateVodSession_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js index 561084c42a4..b4d1e0ad495 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js @@ -23,6 +23,9 @@ function main(name) { // [START videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js index 1267471e65a..b57f5974298 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js @@ -23,6 +23,9 @@ function main(name) { // [START videostitcher_v1_generated_VideoStitcherService_DeleteSlate_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js index d555811fc48..4891bc0c8f7 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js @@ -23,6 +23,9 @@ function main(name) { // [START videostitcher_v1_generated_VideoStitcherService_GetCdnKey_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js index a9763a23e56..3adaca9fb5b 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js @@ -23,6 +23,9 @@ function main(name) { // [START videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js index 2808b8a15ec..39191cca2d6 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js @@ -23,6 +23,9 @@ function main(name) { // [START videostitcher_v1_generated_VideoStitcherService_GetLiveSession_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js index 7393e5a5336..667e1272aac 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js @@ -23,6 +23,9 @@ function main(name) { // [START videostitcher_v1_generated_VideoStitcherService_GetSlate_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js index 1bd825bbf38..c7f650633be 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js @@ -23,6 +23,9 @@ function main(name) { // [START videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js index 94a38451e71..bf4b3825d5a 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js @@ -23,6 +23,9 @@ function main(name) { // [START videostitcher_v1_generated_VideoStitcherService_GetVodSession_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js index d38178f7764..53530102db7 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js @@ -23,6 +23,9 @@ function main(name) { // [START videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js index 1315016127a..e147b822541 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js @@ -23,6 +23,9 @@ function main(parent) { // [START videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js index 18c3981dccd..6d8017fecf8 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js @@ -23,6 +23,9 @@ function main(parent) { // [START videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js index ca60c792424..162e46a607c 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js @@ -23,6 +23,9 @@ function main(parent) { // [START videostitcher_v1_generated_VideoStitcherService_ListSlates_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js index 875b4bc8932..6a56e6df649 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js @@ -23,6 +23,9 @@ function main(parent) { // [START videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js index 33becd70a15..6141171a9cf 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js @@ -23,6 +23,9 @@ function main(parent) { // [START videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js index bcb3a26ac8a..fd70c4f87d3 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js @@ -23,6 +23,9 @@ function main(cdnKey, updateMask) { // [START videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js index 42242cfde9b..8e2474732ab 100644 --- a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js @@ -23,6 +23,9 @@ function main(slate, updateMask) { // [START videostitcher_v1_generated_VideoStitcherService_UpdateSlate_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client.ts b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client.ts index a2f3d77085e..7b0c2f67113 100644 --- a/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client.ts +++ b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_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'); /** @@ -318,7 +317,8 @@ export class VideoStitcherServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1961,7 +1961,7 @@ export class VideoStitcherServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCdnKeys.createStream( - this.innerApiCalls.listCdnKeys as gax.GaxCall, + this.innerApiCalls.listCdnKeys as GaxCall, request, callSettings ); @@ -2015,7 +2015,7 @@ export class VideoStitcherServiceClient { this.initialize(); return this.descriptors.page.listCdnKeys.asyncIterate( this.innerApiCalls['listCdnKeys'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2159,7 +2159,7 @@ export class VideoStitcherServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listVodStitchDetails.createStream( - this.innerApiCalls.listVodStitchDetails as gax.GaxCall, + this.innerApiCalls.listVodStitchDetails as GaxCall, request, callSettings ); @@ -2208,7 +2208,7 @@ export class VideoStitcherServiceClient { this.initialize(); return this.descriptors.page.listVodStitchDetails.asyncIterate( this.innerApiCalls['listVodStitchDetails'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2351,7 +2351,7 @@ export class VideoStitcherServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listVodAdTagDetails.createStream( - this.innerApiCalls.listVodAdTagDetails as gax.GaxCall, + this.innerApiCalls.listVodAdTagDetails as GaxCall, request, callSettings ); @@ -2400,7 +2400,7 @@ export class VideoStitcherServiceClient { this.initialize(); return this.descriptors.page.listVodAdTagDetails.asyncIterate( this.innerApiCalls['listVodAdTagDetails'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2543,7 +2543,7 @@ export class VideoStitcherServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLiveAdTagDetails.createStream( - this.innerApiCalls.listLiveAdTagDetails as gax.GaxCall, + this.innerApiCalls.listLiveAdTagDetails as GaxCall, request, callSettings ); @@ -2592,7 +2592,7 @@ export class VideoStitcherServiceClient { this.initialize(); return this.descriptors.page.listLiveAdTagDetails.asyncIterate( this.innerApiCalls['listLiveAdTagDetails'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2743,7 +2743,7 @@ export class VideoStitcherServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listSlates.createStream( - this.innerApiCalls.listSlates as gax.GaxCall, + this.innerApiCalls.listSlates as GaxCall, request, callSettings ); @@ -2796,7 +2796,7 @@ export class VideoStitcherServiceClient { this.initialize(); return this.descriptors.page.listSlates.asyncIterate( this.innerApiCalls['listSlates'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts b/packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts index 2ca87496fa6..56c7f61cddf 100644 --- a/packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts +++ b/packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts @@ -113,114 +113,111 @@ function stubAsyncIterationCall( } describe('v1.VideoStitcherServiceClient', () => { - it('has servicePath', () => { - const servicePath = - videostitcherserviceModule.v1.VideoStitcherServiceClient.servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + videostitcherserviceModule.v1.VideoStitcherServiceClient.servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - videostitcherserviceModule.v1.VideoStitcherServiceClient.apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + videostitcherserviceModule.v1.VideoStitcherServiceClient.apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = videostitcherserviceModule.v1.VideoStitcherServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + videostitcherserviceModule.v1.VideoStitcherServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new videostitcherserviceModule.v1.VideoStitcherServiceClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient( - { - fallback: true, - } - ); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.videoStitcherServiceStub, undefined); - await client.initialize(); - assert(client.videoStitcherServiceStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.videoStitcherServiceStub, undefined); + await client.initialize(); + assert(client.videoStitcherServiceStub); + }); - it('has close method for the initialized client', done => { - const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - assert(client.videoStitcherServiceStub); - client.close().then(() => { - done(); + it('has close method for the initialized client', done => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.videoStitcherServiceStub); + client.close().then(() => { + done(); + }); }); - }); - it('has close method for the non-initialized client', done => { - const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.videoStitcherServiceStub, undefined); - client.close().then(() => { - done(); + it('has close method for the non-initialized client', done => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.videoStitcherServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new videostitcherserviceModule.v1.VideoStitcherServiceClient( - { - 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 videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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 videostitcherserviceModule.v1.VideoStitcherServiceClient( - { - 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 videostitcherserviceModule.v1.VideoStitcherServiceClient({ + 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('createCdnKey', () => {